/* ── DESIGN TOKENS ── */
:root {
    --bg:           #0c0c0b;
    --surface:      #141413;
    --text:         #ede9e3;
    --dim:          #6e6c66;
    --accent:       #c96442;
    --border:       #1e1e1c;
    --border-up:    #2c2c2a;
    --focus-blue:   #3898ec;

    --font-sans:    -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    --font-mono:    ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, 'Courier New', monospace;
    --font-display: var(--font-mono);

    --content-width: 720px;
    --header-height: 52px;

    --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

:root.light {
    --bg:       #f5f4ed;
    --surface:  #faf9f5;
    --text:     #141413;
    --dim:      #5e5d59;
    --border:   #eeece4;
    --border-up: #e4e2d8;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ── SCROLL PROGRESS BAR ── */
body::before {
    content: '';
    display: block;
    position: fixed;
    top: 0; left: 0;
    height: 2px; width: 100%;
    background: linear-gradient(
        to right,
        var(--accent) calc(var(--scroll-p, 0) * 100%),
        var(--border) calc(var(--scroll-p, 0) * 100%)
    );
    z-index: 10001;
}

/* ── CURSOR GLOW ── */
.cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(600px circle at var(--cx, -600px) var(--cy, -600px), rgba(201, 100, 66, 0.045), transparent 40%);
    pointer-events: none;
    z-index: 0;
    transition: background 0.05s linear;
}

/* ── LOADER ── */
#loader {
    position: fixed; inset: 0;
    z-index: 10000; display: flex; align-items: center; justify-content: center;
    background: var(--bg);
}
.loader-curtain {
    position: absolute; left: 0; width: 100%; height: 50vh;
    background: var(--bg);
    transition: transform 0.9s cubic-bezier(0.7, 0, 0.3, 1);
    z-index: 0;
}
.loader-curtain-top { top: 0; transform-origin: top; }
.loader-curtain-bottom { bottom: 0; transform-origin: bottom; }
.loader-content {
    text-align: center; width: 260px; position: relative; z-index: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.loader-matrix {
    font-family: var(--font-display); font-weight: 900; font-size: 4.5rem;
    color: var(--accent); margin-bottom: 24px; letter-spacing: -3px;
}
.loader-bar-bg {
    height: 1px; background: var(--border-up); width: 100%;
    margin-bottom: 14px; overflow: hidden;
}
#loader-bar { height: 100%; width: 0%; background: var(--accent); transition: width 0.08s linear; }
.loader-status {
    font-family: var(--font-mono); font-size: 0.55rem;
    color: var(--dim); letter-spacing: 0.2em; text-transform: uppercase;
}
#loader.done .loader-content { opacity: 0; transform: scale(0.95); }
#loader.done .loader-curtain-top { transform: scaleY(0); }
#loader.done .loader-curtain-bottom { transform: scaleY(0); }

/* ── STICKY HEADER ── */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    height: var(--header-height);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.header-name {
    font-family: var(--font-mono); font-size: 0.8rem;
    color: var(--dim); letter-spacing: 0.01em;
    opacity: 0; transform: translateY(-4px);
    pointer-events: none;
    transition: color 0.2s ease, opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.header-name.show { opacity: 1; transform: none; pointer-events: auto; }
.header-name:hover { color: var(--text); }
.header-right { display: flex; align-items: center; gap: 20px; }
.header-role {
    font-family: var(--font-mono); font-size: 0.68rem;
    color: var(--dim);
    display: none;
}
@media (min-width: 560px) { .header-role { display: block; } }
#theme-toggle, #sound-toggle {
    background: transparent;
    border: 1px solid var(--border-up);
    cursor: pointer; color: var(--dim);
    font-family: var(--font-mono); font-size: 0.75rem;
    padding: 4px 12px; border-radius: 6px;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    line-height: 1.6;
}
#theme-toggle:hover, #sound-toggle:hover { color: var(--text); border-color: var(--dim); }
#theme-toggle:active, #sound-toggle:active { transform: scale(0.94); }
#sound-toggle.muted span { position: relative; opacity: 0.55; }
#sound-toggle.muted span::after {
    content: ''; position: absolute;
    left: -2px; right: -2px; top: 50%; height: 1px;
    background: currentColor; transform: rotate(-20deg);
}

/* ── MAIN COLUMN ── */
main {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── HERO ── */
.hero {
    padding: 80px 0 64px;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: -80px;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(201, 100, 66, 0.07) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}
.hero-avatar-wrap { margin-bottom: 36px; }
.avatar-hover-container {
    width: 84px; height: 84px; border-radius: 50%;
    overflow: hidden; position: relative;
    border: 1px solid var(--border-up);
    transition: transform 0.3s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
    .avatar-hover-container:hover { transform: scale(1.06); }
}
.avatar-front, .avatar-back {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute; top: 0; left: 0;
    transition: opacity 0.25s ease;
}
.avatar-back { opacity: 0; }
.avatar-hover-container:hover .avatar-front { opacity: 0; }
.avatar-hover-container:hover .avatar-back { opacity: 1; }

.hero-name {
    font-size: clamp(2.8rem, 9vw, 4.8rem);
    font-weight: 700; line-height: 1.0; letter-spacing: -0.05em;
    margin-bottom: 14px;
}
.hero-tagline {
    font-size: 0.9rem;
    color: var(--dim); margin-bottom: 40px; line-height: 1.7;
}
#hero-rotate {
    color: var(--accent);
    transition: opacity 0.3s var(--ease-out);
    display: inline-block;
}
#hero-rotate.out { opacity: 0; }
.hero-social {
    display: flex; flex-wrap: wrap; gap: 22px; align-items: center;
    margin-bottom: 64px;
}
.scroll-hint {
    font-family: var(--font-mono); font-size: 0.7rem;
    color: var(--dim); letter-spacing: 0.08em;
    animation: scrollBounce 2.4s ease-in-out 3;
    display: inline-block;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* ── LIVE STATUS ── */
.live-status {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-mono); font-size: 0.73rem;
    color: var(--dim); margin-top: 32px;
    padding: 9px 14px;
    border: 1px solid var(--border-up);
    border-radius: 8px;
}
.live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #4ade80; flex-shrink: 0;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
    animation: livePulse 2.5s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(74, 222, 128, 0.5); }
    50% { opacity: 0.4; box-shadow: 0 0 3px rgba(74, 222, 128, 0.15); }
}

/* ── SECTIONS ── */
.section {
    padding: 72px 0;
    border-top: 1px solid var(--border);
}
.section-header {
    margin-bottom: 44px;
}
.section-num {
    font-family: var(--font-mono); font-size: 0.62rem;
    color: var(--accent); letter-spacing: 0.14em;
    text-transform: uppercase;
    display: block; margin-bottom: 10px;
}
.section-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
}

/* ── ABOUT ── */
.about-text {
    font-size: 1rem; color: var(--dim); line-height: 1.8;
    margin-bottom: 20px; max-width: 600px;
}
.section-body > .about-text:first-child {
    color: var(--text); opacity: 0.82;
    font-size: 1.025rem;
}

/* ── STATS ROW ── */
.stats-row {
    display: flex; gap: 40px; flex-wrap: wrap;
    padding-top: 28px; margin-top: 28px;
    border-top: 1px solid var(--border);
}
.stat-val {
    display: block;
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 700; letter-spacing: -0.04em;
    color: var(--text); line-height: 1; margin-bottom: 5px;
}
.stat-desc {
    font-family: var(--font-mono); font-size: 0.62rem;
    color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em;
}

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; }
.timeline-entry {
    display: grid; grid-template-columns: 148px 1fr;
    gap: 28px; padding: 30px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.timeline-entry:last-child { border-bottom: none; }

/* spine + dots (desktop only — mobile stacks to one column) */
@media (min-width: 581px) {
    .timeline-entry::after {
        content: ''; position: absolute;
        left: 160px; top: 0; bottom: 0; width: 1px;
        background: var(--border);
    }
    .timeline-entry:first-child::after { top: 8px; }
    .timeline-entry:last-child::after { bottom: auto; height: 38px; }
    .timeline-entry::before {
        content: ''; position: absolute;
        left: 157px; top: 33px;
        width: 7px; height: 7px; border-radius: 50%;
        background: var(--dim);
        box-shadow: 0 0 0 3px var(--bg);
        z-index: 1;
    }
    .timeline-entry:first-child::before {
        background: var(--accent);
        box-shadow: 0 0 0 3px var(--bg), 0 0 8px rgba(201, 100, 66, 0.6);
        animation: dotPulse 2.5s ease-in-out infinite;
    }
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}
.timeline-meta { padding-top: 1px; }
.timeline-period {
    font-family: var(--font-mono); font-size: 0.68rem;
    color: var(--dim); display: block; line-height: 1.7;
}
.timeline-badge {
    display: inline-block; margin-top: 7px;
    font-family: var(--font-mono); font-size: 0.58rem;
    padding: 3px 8px; border-radius: 4px;
}
.timeline-badge.current {
    background: rgba(201, 100, 66, 0.12);
    color: var(--accent);
    border: 1px solid rgba(201, 100, 66, 0.25);
}
.timeline-company {
    font-weight: 600; font-size: 1rem; margin-bottom: 3px;
    cursor: pointer; display: inline-block;
    transition: color 0.18s ease;
}
.timeline-company:hover { color: var(--accent); }
.timeline-role {
    font-family: var(--font-mono); font-size: 0.7rem;
    color: var(--accent); margin-bottom: 16px; opacity: 0.85;
}
.timeline-bullets { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.timeline-bullets li {
    font-size: 0.875rem; color: var(--dim); line-height: 1.7;
    padding-left: 18px; position: relative;
}
.timeline-bullets li::before {
    content: '→'; position: absolute; left: 0;
    color: var(--border-up); font-size: 0.75rem; top: 1px;
}

/* ── TIMELINE HOVER ── */
@media (hover: hover) and (pointer: fine) {
    .timeline-entry {
        transition: background 0.2s ease;
        border-radius: 6px;
        margin: 0 -16px;
        padding-left: 16px; padding-right: 16px;
    }
    .timeline-entry:hover { background: rgba(255, 255, 255, 0.025); }
}

/* ── SKILLS ── */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 48px;
}
.skills-group:last-child { grid-column: 1 / -1; }
.skills-group-label {
    display: flex; align-items: center; gap: 7px;
    font-family: var(--font-mono); font-size: 0.62rem;
    color: var(--dim); text-transform: uppercase;
    letter-spacing: 0.12em; margin-bottom: 12px;
}
.skills-group-label svg { width: 12px; height: 12px; flex-shrink: 0; opacity: 0.6; }
.skills-tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* ── TAGS ── */
.tag {
    font-family: var(--font-mono); font-size: 0.67rem;
    padding: 4px 10px; border-radius: 5px;
    background: transparent;
    border: 1px solid var(--border-up);
    color: var(--dim);
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    display: inline-block; cursor: pointer;
}
.tag:hover { border-color: var(--dim); color: var(--text); }
.tag:active { transform: scale(0.95); }

/* ── CONNECT ── */
.connect-title {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    letter-spacing: -0.035em; line-height: 1.08;
    margin-top: 4px;
}
.connect-lead {
    color: var(--dim);
    font-size: 1.05rem; line-height: 1.7;
    max-width: 430px; margin-bottom: 36px;
}
.connect-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 44px; align-items: start;
}
.copy-email {
    display: inline-flex; align-items: center; gap: 11px;
    font-family: var(--font-sans); font-size: 0.92rem;
    color: var(--text); cursor: pointer;
    background: transparent;
    border: 1px solid var(--border-up);
    border-radius: 14px;
    padding: 15px 22px;
    margin: 0 10px 10px 0;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
}
.copy-email svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) {
    .copy-email:hover { border-color: var(--accent); background: rgba(201, 100, 66, 0.06); }
}
.copy-email:active { transform: scale(0.98); }

.connect-socials {
    display: flex; gap: 22px; align-items: center;
    margin-top: 34px;
}
.social-icon {
    color: var(--dim);
    display: inline-flex;
    transition: color 0.18s ease, transform 0.18s var(--ease-out);
}
.social-icon svg { width: 19px; height: 19px; }
.social-icon:hover { color: var(--text); transform: translateY(-2px); }

/* ── RECRUITER FIT ENGINE ── */
.fit { padding: 16px 0; }
.fit-card {
    background: var(--surface);
    border: 1px solid var(--border-up);
    border-radius: 16px;
    padding: 28px;
}
.fit-eyebrow {
    font-family: var(--font-mono); font-size: 0.62rem;
    color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase;
    margin-bottom: 12px;
}
.fit-title {
    font-size: clamp(1.3rem, 3.2vw, 1.7rem);
    font-weight: 700; letter-spacing: -0.02em; line-height: 1.15;
    margin-bottom: 10px;
}
.fit-sub { color: var(--dim); font-size: 0.95rem; margin-bottom: 20px; max-width: 520px; }
#fit-jd {
    width: 100%; resize: vertical; min-height: 96px;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border-up); border-radius: 10px;
    padding: 12px 14px; font-family: var(--font-sans); font-size: 0.9rem;
    line-height: 1.6; outline: none;
    transition: border-color 0.2s ease;
}
#fit-jd:focus { border-color: var(--focus-blue); }
#fit-jd::placeholder { color: var(--dim); }
#fit-go {
    margin-top: 14px;
    background: var(--accent); color: #fff; border: none; cursor: pointer;
    font-family: var(--font-mono); font-weight: 700; font-size: 0.78rem;
    padding: 11px 20px; border-radius: 9px;
    transition: opacity 0.2s ease, transform 0.12s ease;
}
#fit-go:hover { opacity: 0.9; transform: scale(1.02); }
#fit-go:active { transform: scale(0.97); }
#fit-go:disabled { opacity: 0.5; cursor: default; transform: none; }

.fit-result { margin-top: 26px; }
.fit-result[hidden] { display: none; }
.fit-score { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
#fit-pct {
    font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 700;
    letter-spacing: -0.04em; color: var(--text); min-width: 92px;
}
.fit-bar {
    flex: 1; height: 8px; border-radius: 999px;
    background: var(--border); overflow: hidden;
}
.fit-bar > i {
    display: block; height: 100%; width: 0;
    background: var(--accent); border-radius: 999px;
    transition: width 1.1s var(--ease-out);
}
.fit-block { margin-bottom: 18px; }
.fit-block[hidden] { display: none; }
.fit-label {
    font-family: var(--font-mono); font-size: 0.6rem;
    color: var(--dim); letter-spacing: 0.12em; text-transform: uppercase;
    margin-bottom: 9px;
}
.fit-matched, .fit-gaps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.fit-matched li, .fit-gaps li {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--font-mono); font-size: 0.7rem;
    border-radius: 6px; padding: 5px 10px;
}
.fit-matched li {
    color: var(--text);
    border: 1px solid rgba(201, 100, 66, 0.3);
    background: rgba(201, 100, 66, 0.08);
}
.fit-matched li::before { content: '✓'; color: var(--accent); font-weight: 700; }
.fit-gaps li {
    color: var(--dim);
    border: 1px solid var(--border-up);
    background: transparent;
}
.fit-gaps li::before { content: '→'; color: var(--dim); font-weight: 700; }
.fit-pitch { color: var(--dim); font-size: 0.95rem; line-height: 1.7; margin-bottom: 20px; }
.fit-pitch p { margin-bottom: 10px; }
.fit-pitch p:last-child { margin-bottom: 0; }
.fit-cta {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent);
    border: 1px solid rgba(201, 100, 66, 0.4); border-radius: 9px;
    padding: 9px 16px; transition: background 0.2s ease;
}
.fit-cta:hover { background: rgba(201, 100, 66, 0.08); }

/* ── FOOTER ── */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono); font-size: 0.62rem;
    color: var(--dim); opacity: 0.4; text-align: center;
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: center; gap: 6px 0;
}
.visitor-count { white-space: nowrap; }
.visitor-count::before { content: '·'; margin: 0 14px; }
#visitor-count-num {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* ── HERO LOAD STAGGER ── */
.hero [data-hero] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
body.hero-loaded .hero [data-hero="1"] { opacity: 1; transform: none; transition-delay: 0ms; }
body.hero-loaded .hero [data-hero="2"] { opacity: 1; transform: none; transition-delay: 130ms; }
body.hero-loaded .hero [data-hero="3"] { opacity: 1; transform: none; transition-delay: 240ms; }
body.hero-loaded .hero [data-hero="4"] { opacity: 1; transform: none; transition-delay: 370ms; }
body.hero-loaded .hero [data-hero="5"] { opacity: 1; transform: none; transition-delay: 540ms; }

/* ── SCROLL REVEAL ── */
.reveal, .reveal-item {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.55s var(--ease-out),
        transform 0.55s var(--ease-out);
}
.reveal.visible, .reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-item:nth-child(2) { transition-delay: 0.09s; }
.reveal-item:nth-child(3) { transition-delay: 0.18s; }
.reveal-item:nth-child(4) { transition-delay: 0.27s; }

/* ── CHATBOT WIDGET ── */
#chatbot-widget {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: 20px;
    z-index: 2000;
    display: flex; flex-direction: column; align-items: flex-end;
}
#chat-toggle {
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--accent); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(201, 100, 66, 0.35);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
@media (hover: hover) and (pointer: fine) {
    #chat-toggle:hover {
        transform: scale(1.1) rotate(4deg);
        box-shadow: 0 8px 24px rgba(201, 100, 66, 0.5);
    }
}
#chat-toggle:active { transform: scale(0.94); box-shadow: 0 2px 8px rgba(201, 100, 66, 0.3); }
#chat-toggle svg { width: 20px; height: 20px; stroke: #fff; }
#chat-toggle.nudge { animation: chatNudge 2.6s ease-in-out infinite; }
@keyframes chatNudge {
    0%, 100% { box-shadow: 0 4px 16px rgba(201, 100, 66, 0.35), 0 0 0 0 rgba(201, 100, 66, 0.45); }
    50%      { box-shadow: 0 4px 16px rgba(201, 100, 66, 0.35), 0 0 0 9px rgba(201, 100, 66, 0); }
}

/* ── CHAT PEEK BUBBLE ── */
#chat-peek {
    font-family: var(--font-sans); font-size: 0.78rem;
    color: var(--text); background: var(--surface);
    border: 1px solid var(--border-up); border-radius: 12px;
    padding: 9px 14px; margin-bottom: 12px; cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    max-width: 220px; text-align: left; line-height: 1.4;
    position: relative;
    opacity: 0; transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
#chat-peek::after {
    content: ''; position: absolute;
    bottom: -5px; right: 18px;
    width: 10px; height: 10px;
    background: var(--surface);
    border-right: 1px solid var(--border-up);
    border-bottom: 1px solid var(--border-up);
    transform: rotate(45deg);
}
#chat-peek.show { opacity: 1; transform: none; pointer-events: auto; }

#chat-window {
    width: min(440px, calc(100vw - 40px));
    height: 600px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border-up);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.03);
    margin-bottom: 12px;
    display: none; flex-direction: column; overflow: hidden;
    animation: chatReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes chatReveal {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}
#chat-window.active { display: flex; }

.chat-header {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.chat-header span {
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--dim);
}
.chat-header-right { display: flex; align-items: center; gap: 10px; }
.chat-kbd {
    font-family: var(--font-mono); font-size: 0.58rem;
    color: var(--dim); letter-spacing: 0.05em;
    padding: 2px 6px; border-radius: 5px;
    border: 1px solid var(--border-up);
}
.chat-close {
    background: transparent; border: none; cursor: pointer;
    color: var(--dim); font-size: 0.95rem;
    padding: 2px 6px; border-radius: 4px;
    transition: color 0.2s ease;
    line-height: 1;
}
.chat-close:hover { color: var(--text); }

#chat-messages {
    flex: 1; overflow-y: auto; padding: 14px;
    display: flex; flex-direction: column; gap: 9px;
    scroll-behavior: smooth;
}
.msg {
    max-width: 88%; padding: 9px 13px;
    font-size: 0.82rem; line-height: 1.55;
    border-radius: 11px;
    animation: msgSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes msgSlide {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: none; }
}
.msg.bot {
    align-self: flex-start;
    background: var(--bg);
    border: 1px solid var(--border-up);
    color: var(--text);
    border-bottom-left-radius: 3px;
}
.msg.user {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 3px;
}

.chat-input-area {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.home-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.chip {
    font-family: var(--font-mono); font-size: 0.62rem;
    padding: 4px 9px; border-radius: 5px;
    background: transparent;
    border: 1px solid var(--border-up);
    color: var(--dim); cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.chip:hover, .chip:focus-visible { border-color: var(--dim); color: var(--text); outline: none; }

.chat-input-box {
    display: flex; align-items: center;
    background: var(--bg); border-radius: 9px;
    border: 1px solid var(--border-up);
    padding: 3px 3px 3px 12px;
    transition: border-color 0.2s ease;
}
.chat-input-box:focus-within { border-color: var(--focus-blue); }
.chat-input-box input {
    flex: 1; border: none; background: transparent; outline: none;
    font-size: 0.85rem; color: var(--text);
    font-family: var(--font-sans); padding: 7px 0;
}
.chat-input-box input::placeholder { color: var(--dim); }
#chat-send {
    background: var(--accent); border: none; cursor: pointer;
    color: #fff; font-family: var(--font-mono); font-weight: 700;
    padding: 6px 13px; border-radius: 7px; font-size: 0.68rem;
    transition: opacity 0.2s ease, transform 0.12s ease;
}
#chat-send:hover { opacity: 0.88; transform: scale(1.03); }
#chat-send:active { transform: scale(0.96); opacity: 1; }
#chat-send:disabled { opacity: 0.4; transform: none; }

.typing-dots { display: flex; gap: 4px; padding: 3px 0; align-items: center; }
.typing-dots span {
    width: 5px; height: 5px; background: var(--dim);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.65); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ── TOAST ── */
#toast {
    position: fixed;
    bottom: 28px; left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--surface);
    border: 1px solid var(--border-up);
    border-radius: 9px;
    padding: 10px 18px;
    font-family: var(--font-mono); font-size: 0.72rem;
    color: var(--text);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 10002;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── BACKGROUND CANVAS ── */
#bg-canvas {
    position: fixed; inset: 0; z-index: -1;
    pointer-events: none; opacity: 0.12;
}

/* ── LIGHT MODE OVERRIDES ── */
:root.light body::before { opacity: 0.5; }
:root.light #chat-window {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0,0,0,0.04);
}
:root.light .msg.bot { background: var(--surface); }
:root.light .chat-input-box { background: var(--surface); }
:root.light #chat-messages { background: var(--bg); }
:root.light #loader { background: var(--surface); }
:root.light .timeline-entry:hover { background: rgba(0, 0, 0, 0.02); }

/* ── RESPONSIVE ── */
@media (max-width: 580px) {
    main { padding: 0 18px; }
    .hero { padding: 56px 0 44px; }
    .hero-name { font-size: 2.4rem; }
    .section { padding: 56px 0; }
    .timeline-entry { grid-template-columns: 1fr; gap: 4px; }
    .timeline-meta { display: flex; align-items: center; gap: 10px; }
    .timeline-period { display: inline; }
    .timeline-entry { margin: 0; padding-left: 0; padding-right: 0; }
    .site-header { padding: 0 18px; }
    #chatbot-widget { right: 16px; }
    #chat-window { height: 520px; }
    .skills-grid { grid-template-columns: 1fr; }
    .skills-group:last-child { grid-column: auto; }
    .stats-row { gap: 24px; }
    .connect-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ── AUDIENCE PERSONALIZER ── */
body.aud-ai { --accent: #3ba88f; }
body.aud-explore { --accent: #d9933f; }

/* Personal block is explorer-only; work sections step back in explorer mode */
#personal { display: none; }
body.aud-explore #personal { display: block; }
body.aud-explore #experience,
body.aud-explore #skills,
body.aud-explore #fit-check,
body.aud-explore .stats-row { display: none; }

.ig-cta {
    display: inline-flex; align-items: center; gap: 14px;
    margin-top: 8px; padding: 16px 20px;
    border: 1px solid var(--border-up); border-radius: 14px;
    background: var(--surface); color: var(--text);
    transition: border-color 0.2s ease, transform 0.18s var(--ease-out);
}
.ig-cta:hover { border-color: var(--accent); transform: translateY(-2px); }
.ig-cta svg { width: 26px; height: 26px; color: var(--accent); flex-shrink: 0; }
.ig-cta span { font-size: 0.9rem; line-height: 1.4; }
.ig-cta strong { font-family: var(--font-mono); font-size: 0.95rem; }

.aud-overlay {
    position: fixed; inset: 0; z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.35s ease;
}
.aud-overlay[hidden] { display: none; }
.aud-overlay.closing { opacity: 0; pointer-events: none; }
.aud-ask { width: 90%; max-width: 460px; text-align: center; animation: audRise 0.4s var(--ease-out); }
@keyframes audRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.aud-eye {
    font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.aud-ask h2 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -0.03em; margin-bottom: 24px; }
.aud-opt {
    display: block; width: 100%; text-align: left;
    background: var(--surface); border: 1px solid var(--border-up); color: var(--text);
    border-radius: 12px; padding: 15px 18px; margin-bottom: 11px; cursor: pointer;
    font-family: var(--font-sans); font-size: 0.95rem;
    transition: border-color 0.18s ease, transform 0.18s var(--ease-out);
}
.aud-opt small { display: block; color: var(--dim); font-size: 0.78rem; margin-top: 2px; }
.aud-opt:hover { border-color: var(--accent); transform: translateY(-2px); }
.aud-skip {
    margin-top: 6px; background: none; border: none; color: var(--dim);
    font-family: var(--font-mono); font-size: 0.7rem; cursor: pointer;
}
.aud-skip:hover { color: var(--text); }

.hero-intro {
    font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent);
    margin: 4px 0 10px;
}
.hero-intro[hidden] { display: none; }

.aud-trigger {
    position: fixed; left: 20px; bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 1500;
    font-family: var(--font-mono); font-size: 0.66rem; color: var(--dim);
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-up); border-radius: 20px;
    padding: 7px 13px; cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease;
}
.aud-trigger:hover { color: var(--text); border-color: var(--accent); }
@media (max-width: 580px) { .aud-trigger { font-size: 0.6rem; padding: 6px 10px; } }

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal, .reveal-item { opacity: 1; transform: none; }
    .hero [data-hero] { opacity: 1; transform: none; }
    #bg-canvas { opacity: 0; }
}
