/* ==========================================================================
   Tokens — dark only
   ========================================================================== */
:root {
    color-scheme: dark;

    --bg: #0a0a0f;
    --bg-raise: #101017;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    --text: #f4f4f7;
    --text-soft: #c9c9d3;
    --muted: #9696a4;        /* 7:1 on --bg */

    --accent: #3ee6ff;       /* electric cyan */
    --accent-rgb: 62, 230, 255;
    --accent-ink: #04131a;   /* text on accent */
    --ok: #4ade80;
    --warn: #fbbf24;

    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

    --radius: 18px;
    --radius-sm: 10px;
    --container: 1120px;
    --gutter: clamp(16px, 4vw, 40px);
    --section-gap: clamp(5rem, 12vw, 9rem);
}

/* Lenis (inlined from lenis@1.3.26/dist/lenis.css) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
html:not(.lenis) { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

img { max-width: 100%; display: block; }
ul { list-style: none; }
a { color: inherit; }
strong { color: var(--text); font-weight: 600; }
code { font-family: var(--mono); font-size: 0.92em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); font-weight: 400; }
.accent { color: var(--accent); }
.nowrap { white-space: nowrap; }

::selection { background: rgba(var(--accent-rgb), 0.3); color: #fff; }

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

.skip-link {
    position: absolute; left: 16px; top: -100px; z-index: 200;
    background: var(--accent); color: var(--accent-ink);
    padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Ambient glow — fixed, never repaints on scroll */
.bg-glow {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(60vw 50vh at 85% -10%, rgba(var(--accent-rgb), 0.13), transparent 70%),
        radial-gradient(50vw 60vh at -10% 40%, rgba(var(--accent-rgb), 0.06), transparent 70%),
        radial-gradient(70vw 50vh at 50% 120%, rgba(var(--accent-rgb), 0.08), transparent 70%);
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10, 10, 15, 0.6);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--container); margin: 0 auto;
    padding: 0.85rem var(--gutter);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-mark {
    font-family: var(--mono); font-weight: 500; font-size: 0.9rem;
    letter-spacing: 0.12em; text-decoration: none; color: var(--text);
}
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a {
    font-size: 0.85rem; color: var(--muted); text-decoration: none;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta {
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    padding: 0.3rem 0.8rem; border-radius: 999px;
}
.nav-links .nav-cta:hover { background: rgba(var(--accent-rgb), 0.1); color: var(--accent); }

@media (max-width: 767px) {
    .nav-links li:not(:last-child) { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex; align-items: center;
    padding: 7rem 0 4rem;
}
.hero-stage {
    width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
    display: flex; flex-direction: column; gap: 2.5rem;
    position: relative;
}
.hero-role {
    font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent);
}
.hero-name {
    font-size: clamp(3rem, 11vw, 9.5rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.045em;
    background: linear-gradient(180deg, #ffffff 30%, #a9a9b8 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    will-change: transform;
}
.hero-name .accent { -webkit-text-fill-color: var(--accent); }

.hero-detail {
    display: flex; gap: 2rem; align-items: center; flex-wrap: wrap;
}
.avatar {
    position: relative; flex: 0 0 auto;
    width: clamp(112px, 16vw, 168px); aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1d2a33, #0e0e14);
    border: 1px solid var(--border-strong);
    box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.06), 0 20px 60px rgba(var(--accent-rgb), 0.15);
    overflow: hidden;
}
/* Initials fallback sits under the photo; visible if the image fails */
.avatar::before {
    content: attr(data-initials);
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-family: var(--mono); font-weight: 500; letter-spacing: 0.1em;
    font-size: clamp(1.2rem, 2.4vw, 1.7rem); color: var(--accent);
}
.avatar img { position: relative; width: 100%; height: 100%; object-fit: cover; }

.hero-copy { flex: 1 1 320px; min-width: 0; }
.hero-eyebrow { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 0.6rem; }
.hero-tagline {
    font-size: clamp(1.2rem, 2.2vw, 1.55rem); line-height: 1.35;
    color: var(--text-soft); font-weight: 400; letter-spacing: -0.01em;
    max-width: 34ch; margin-bottom: 1rem;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; color: var(--muted); font-size: 0.9rem; margin-bottom: 1.2rem; }
.hero-meta i { color: var(--accent); margin-right: 0.35rem; }

.social-links { display: flex; gap: 0.6rem; }
.social-links a {
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-soft); text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.social-links a:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.08); }

.scroll-cue { display: none; }

/* Animated hero (desktop, motion allowed): big centered name, details come in on scroll */
@media (min-width: 768px) {
    html.anim .hero { height: 100vh; min-height: 0; padding-top: 5rem; padding-bottom: 2rem; }
    html.anim .hero-stage { align-items: center; text-align: center; gap: 1.8rem; }
    html.anim .hero-name { transform-origin: 50% 100%; font-size: min(10vw, 17vh, 9.5rem); }
    html.anim .hero-detail { justify-content: center; text-align: left; }
    html.anim .scroll-cue {
        display: flex; align-items: center; gap: 0.6rem;
        position: absolute; left: 50%; bottom: -3.5rem; transform: translateX(-50%);
        font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
    }
    html.anim .scroll-cue span {
        width: 1px; height: 28px; background: linear-gradient(var(--accent), transparent);
        animation: cue 1.8s ease-in-out infinite;
    }
}
@keyframes cue { 0%, 100% { transform: scaleY(0.4); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-top: var(--section-gap); }
.section-header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2.5rem; }
.section-num { font-size: 0.8rem; color: var(--accent); letter-spacing: 0.08em; }
.section-header h2 {
    font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700;
    letter-spacing: -0.035em; line-height: 1.05;
}
.subhead {
    font-size: 0.8rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--muted); margin: 4rem 0 1.5rem;
}

/* Glass card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    transition: border-color 0.25s, background 0.25s;
}
.card:hover { border-color: var(--border-strong); background: var(--surface-hover); }

/* ---------- About ---------- */
.about-text {
    font-size: clamp(1.2rem, 2.4vw, 1.7rem);
    line-height: 1.5; font-weight: 400; letter-spacing: -0.015em;
    color: var(--text-soft); max-width: 44ch;
}
.about-text strong { color: var(--accent); font-weight: 500; }
.about-text .split-line { overflow: clip; padding-bottom: 0.08em; }

.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; }
.pill {
    font-family: var(--mono); font-size: 0.78rem; color: var(--text-soft);
    padding: 0.4rem 0.85rem; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface);
}

/* ---------- Badges, tags, buttons ---------- */
.badge {
    font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
    padding: 0.28rem 0.6rem; border-radius: 999px; white-space: nowrap;
    color: var(--muted); border: 1px solid var(--border);
}
.badge-live { color: var(--ok); border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.07); }
.badge-live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 0.45rem; vertical-align: 1px; box-shadow: 0 0 8px var(--ok); }
.badge-review { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.06); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.tags li {
    font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
    padding: 0.2rem 0.55rem; border-radius: 6px; background: rgba(255, 255, 255, 0.04);
}

.btn-group { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    min-height: 44px; padding: 0.55rem 1.1rem; border-radius: 999px;
    font-size: 0.88rem; font-weight: 500; text-decoration: none;
    color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.btn:hover { border-color: rgba(var(--accent-rgb), 0.6); color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: #7eefff; color: var(--accent-ink); }

/* ---------- Guidera spotlight ---------- */
.spotlight { position: relative; }
.spotlight-inner {
    display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center;
    padding-top: 1rem; padding-bottom: 1rem;
}
.spotlight-kicker { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.8rem; }
.spotlight-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.spotlight-title { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.spotlight-desc { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-soft); max-width: 46ch; }

.phone-wrap { position: relative; justify-self: center; width: min(280px, 60vw); }
.phone {
    position: relative; z-index: 1;
    aspect-ratio: 9 / 19.5; width: 100%;
    border-radius: 46px; padding: 10px;
    background: linear-gradient(145deg, #2a2a33, #111116);
    border: 1px solid var(--border-strong);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.phone-island {
    position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 2;
    width: 34%; height: 24px; border-radius: 999px; background: #000;
}
.phone-screen {
    position: relative; height: 100%; border-radius: 37px; overflow: hidden;
    background: linear-gradient(180deg, #0c1a22 0%, #081015 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    gap: 0.8rem; padding: 0 1.2rem 2.2rem;
}
.phone-map {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 60% 35%, rgba(var(--accent-rgb), 0.35), transparent 30%),
        repeating-linear-gradient(35deg, transparent 0 22px, rgba(255, 255, 255, 0.05) 22px 23px),
        repeating-linear-gradient(-55deg, transparent 0 34px, rgba(255, 255, 255, 0.04) 34px 35px);
    -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 85%);
    mask-image: linear-gradient(180deg, #000 45%, transparent 85%);
}
.phone-icon-card {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
    margin-bottom: auto; margin-top: 30%;
}
.phone-icon-card img { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.35); }
.phone-icon-card span { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.phone-wave { position: relative; display: flex; align-items: center; gap: 4px; height: 36px; }
.phone-wave i { width: 4px; border-radius: 2px; background: var(--accent); height: 30%; animation: wave 1.2s ease-in-out infinite; }
.phone-wave i:nth-child(2n) { animation-delay: -0.3s; }
.phone-wave i:nth-child(3n) { animation-delay: -0.6s; }
.phone-wave i:nth-child(4n) { animation-delay: -0.9s; }
@keyframes wave { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(2.6); } }
.phone-bar { position: relative; width: 100%; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); }
.phone-bar.short { width: 60%; }
.phone-halo {
    position: absolute; inset: 10% -30%; z-index: 0; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.25), transparent);
}

@media (min-width: 768px) {
    .spotlight-inner { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; }
    html.anim .spotlight { min-height: 100vh; display: flex; align-items: center; }
}

/* ---------- Project cards ---------- */
.project-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 700px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .project-grid { grid-template-columns: repeat(3, 1fr); } }
.project-card { display: flex; flex-direction: column; }
.project-card p { font-size: 0.93rem; color: var(--text-soft); }
.project-card .btn-group { margin-top: auto; padding-top: 1.25rem; }
.project-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.project-icon {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    color: var(--accent); background: rgba(var(--accent-rgb), 0.08); border: 1px solid rgba(var(--accent-rgb), 0.2);
}
.project-title { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline-track { position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--border); border-radius: 2px; }
.timeline-line {
    position: absolute; inset: 0; border-radius: 2px;
    background: linear-gradient(var(--accent), rgba(var(--accent-rgb), 0.3));
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
    transform-origin: top;
}
.exp-item { position: relative; padding-bottom: 3.5rem; }
.exp-item:last-child { padding-bottom: 0; }
.exp-dot {
    position: absolute; left: calc(-2rem - 0px); top: 6px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}
.exp-date { font-size: 0.78rem; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.exp-role { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.exp-company { color: var(--text); font-weight: 500; margin: 0.2rem 0 1rem; }
.exp-company span { color: var(--muted); font-weight: 400; }
.task-list { display: grid; gap: 0.6rem; max-width: 72ch; }
.task-list li { position: relative; padding-left: 1.3rem; color: var(--text-soft); font-size: 0.96rem; }
.task-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); font-size: 0.85em; top: 0.1em; }

@media (min-width: 900px) {
    .timeline { padding-left: 0; }
    .timeline-track { left: calc(200px + 1.5rem); }
    .exp-item { display: grid; grid-template-columns: 200px 1fr; column-gap: 3.5rem; }
    .exp-item > .exp-date { grid-column: 1; grid-row: 1 / span 3; text-align: right; padding-top: 0.35rem; }
    .exp-item > :not(.exp-date):not(.exp-dot) { grid-column: 2; }
    .exp-dot { left: calc(200px + 1.5rem - 5px); top: 10px; }
}

/* ---------- Education / certs ---------- */
.edu-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .edu-grid { grid-template-columns: repeat(3, 1fr); } }
.edu-date { font-size: 0.75rem; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 0.6rem; }
.edu-degree { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.edu-school { color: var(--muted); font-size: 0.9rem; margin: 0.35rem 0 0.9rem; }
.edu-detail { font-size: 0.92rem; color: var(--text-soft); }
.edu-detail a { color: var(--accent); text-underline-offset: 3px; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 700px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .skills-grid { grid-template-columns: repeat(3, 1fr); } }
.skill-label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.skills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skills li {
    font-size: 0.84rem; padding: 0.3rem 0.7rem; border-radius: 8px;
    background: rgba(255, 255, 255, 0.04); color: var(--text-soft);
}
.skills li.featured { color: var(--accent); background: rgba(var(--accent-rgb), 0.08); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.25); }

/* ---------- Languages ---------- */
.lang-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 600px) { .lang-grid { grid-template-columns: repeat(3, 1fr); } }
.lang-name { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; }
.lang-level { font-size: 0.8rem; color: var(--accent); margin-top: 0.25rem; }
.pills-beyond { margin-top: 1.5rem; }

/* ==========================================================================
   Chat terminal
   ========================================================================== */
.terminal {
    position: relative;
    max-width: 820px;
    border-radius: var(--radius);
    background: rgba(13, 15, 20, 0.72);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border-strong);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(var(--accent-rgb), 0.05), 0 0 80px rgba(var(--accent-rgb), 0.08);
    overflow: hidden;
}
.terminal-bar {
    display: flex; align-items: center; gap: 0.9rem;
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a44; }
.terminal-title { font-size: 0.75rem; color: var(--muted); flex: 1; }
.terminal-count { font-size: 0.75rem; color: var(--accent); white-space: nowrap; }

.terminal-header {
    font-size: 0.8rem; color: var(--muted); line-height: 1.55;
    padding: 1rem 1.2rem 0;
}
.terminal-header strong { color: var(--accent); font-weight: 500; }
.terminal-header a, .terminal-log a, .terminal-noscript a { color: var(--accent); text-underline-offset: 3px; }

.terminal-log {
    font-size: 0.88rem; line-height: 1.6;
    padding: 1rem 1.2rem;
    min-height: 180px; max-height: min(420px, 55vh);
    overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column; gap: 0.9rem;
}
.line { white-space: pre-wrap; word-wrap: break-word; }
.line-sys { color: var(--text-soft); }
.line-user { color: var(--text); }
.line-user::before { content: "> "; color: var(--accent); }
.line-ai { color: var(--text-soft); padding-left: 1rem; border-left: 2px solid rgba(var(--accent-rgb), 0.4); }
.line-err { color: var(--warn); padding-left: 1rem; border-left: 2px solid rgba(251, 191, 36, 0.5); }

.cursor {
    display: inline-block; width: 0.55em; height: 1.05em; margin-left: 0.3em;
    background: var(--accent); vertical-align: -0.15em;
    animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.typing { display: inline-flex; gap: 5px; align-items: center; color: var(--muted); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: typing 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.terminal-noscript { font-size: 0.85rem; color: var(--text-soft); padding: 0 1.2rem 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.2rem 1rem; }
.chip {
    font-family: var(--mono); font-size: 0.76rem;
    color: var(--text-soft); background: var(--surface);
    border: 1px solid var(--border-strong); border-radius: 999px;
    padding: 0.45rem 0.85rem; min-height: 36px; cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.chip:hover:not(:disabled) { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.06); }
.chip:disabled { opacity: 0.4; cursor: not-allowed; }
.js .chips:empty, .chips[hidden] { display: none; }
html:not(.js) .chips, html:not(.js) .terminal-form { display: none; }

.terminal-form {
    display: flex; align-items: center; gap: 0.6rem;
    border-top: 1px solid var(--border);
    padding: 0.6rem 0.6rem 0.6rem 1.2rem;
}
.prompt { color: var(--accent); font-size: 0.95rem; }
.terminal-form input {
    flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
    color: var(--text); font-size: 16px; /* 16px avoids iOS zoom on focus */
    caret-color: var(--accent); padding: 0.55rem 0;
}
.terminal-form input::placeholder { color: #6e6e7c; }
.terminal-form:focus-within { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.45); }
.terminal-form input:focus-visible { outline: none; }
.char-count { font-size: 0.7rem; color: var(--muted); }
.char-count.near { color: var(--warn); }
.send {
    width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; border: 0; cursor: pointer;
    background: var(--accent); color: var(--accent-ink); font-size: 0.95rem;
    display: grid; place-items: center; transition: opacity 0.2s, transform 0.2s;
}
.send:hover:not(:disabled) { transform: translateY(-1px); }
.send:disabled { opacity: 0.35; cursor: not-allowed; }
.send-fallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.privacy { font-size: 0.7rem; color: var(--muted); padding: 0 1.2rem 0.9rem; }

/* Floating chat button */
.chat-fab {
    position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90;
    display: inline-flex; align-items: center; gap: 0.55rem;
    min-height: 48px; padding: 0 1.1rem; border-radius: 999px;
    font-family: var(--mono); font-size: 0.8rem; font-weight: 500; text-decoration: none;
    color: var(--accent-ink); background: var(--accent);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.35), 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s, transform 0.3s;
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
@media (max-width: 480px) { .chat-fab span { display: none; } .chat-fab { width: 52px; justify-content: center; padding: 0; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { margin-top: var(--section-gap); border-top: 1px solid var(--border); padding: 3rem 0 6rem; }
.footer-inner { display: flex; flex-direction: column; gap: 1.5rem; }
.footer-quote { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 500; letter-spacing: -0.02em; color: var(--text-soft); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem; }
.footer-links a { color: var(--text-soft); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-links i { color: var(--accent); margin-right: 0.4rem; }
.footer-meta { font-size: 0.75rem; color: var(--muted); }

/* ==========================================================================
   Motion prep. html.prehide hides elements only until GSAP has set their
   start states (main.js removes it right after). If GSAP never loads, a
   timeout in <head> removes it, so content is never stuck hidden.
   ========================================================================== */
html.prehide [data-reveal],
html.prehide [data-cards] > *,
html.prehide [data-stagger] > *,
html.prehide .exp-item { opacity: 0; }
@media (min-width: 768px) {
    html.prehide .hero-detail,
    html.prehide .spotlight-copy > *,
    html.prehide .phone-wrap { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .cursor { opacity: 1; }
}
