/* ============================================================
   PORTFOLIO — Juan David Avellaneda
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
a { text-decoration: none; }
input, textarea, select { font-family: inherit; }

/* ── Tokens: Dark (default) ── */
:root {
    --bg:           #000000;
    --bg-alt:       #080808;
    --card:         #0d0d0d;
    --border:       rgba(255,255,255,0.07);
    --border-h:     rgba(255,255,255,0.16);
    --text:         #ffffff;
    --text-2:       rgba(255,255,255,0.55);
    --text-3:       rgba(255,255,255,0.28);
    --accent:       #818cf8;
    --accent-glow:  rgba(129,140,248,0.18);
    --dot:          #818cf8;
    --green:        #22c55e;
    --radius:       14px;
    --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Tokens: Light ── */
[data-theme="light"] {
    --bg:           #fafafa;
    --bg-alt:       #f0f0f0;
    --card:         #ffffff;
    --border:       rgba(0,0,0,0.07);
    --border-h:     rgba(0,0,0,0.16);
    --text:         #0a0a0a;
    --text-2:       rgba(0,0,0,0.55);
    --text-3:       rgba(0,0,0,0.28);
    --accent:       #6366f1;
    --accent-glow:  rgba(99,102,241,0.12);
}

/* ── Base ── */
html { scroll-behavior: auto; } /* Lenis handles scroll */

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
}

/* ── Grain overlay ── */
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.038;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Custom cursor ── */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 10000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.cursor-dot {
    width: 5px; height: 5px;
    background: var(--text);
    transition: opacity 0.2s;
}
.cursor-ring {
    width: 32px; height: 32px;
    border: 1px solid rgba(255,255,255,0.4);
    transition: width 0.25s, height 0.25s, border-color 0.25s, opacity 0.2s;
}
[data-theme="light"] .cursor-ring { border-color: rgba(0,0,0,0.35); }
.cursor-ring--hover {
    width: 48px; height: 48px;
    border-color: var(--accent);
}
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ── Layout ── */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 120px 0; }

/* ── Typography helpers ── */
.dot { color: var(--accent); }

/* ── NAV ── */
.nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: auto;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
    transition: box-shadow var(--transition), border-color var(--transition), top var(--transition);
}
.nav--scrolled {
    top: 12px;
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}
[data-theme="light"] .nav {
    background: rgba(255,255,255,0.65);
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}
[data-theme="light"] .nav--scrolled {
    border-color: rgba(0,0,0,0.15);
}

.nav__inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 6px 6px 18px;
    white-space: nowrap;
}

.nav__logo {
    flex-shrink: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}
.nav__logo:hover { opacity: 0.75; }
.nav__logo-img {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: block;
}

.nav__links {
    display: flex;
    gap: 0;
    margin-left: 8px;
}
.nav__link {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    padding: 7px 14px;
    border-radius: 100px;
    transition: color 0.2s, background 0.2s;
}
[data-theme="light"] .nav__link { color: rgba(0,0,0,0.5); }
.nav__link:hover { color: var(--text); background: rgba(255,255,255,0.08); }
[data-theme="light"] .nav__link:hover { background: rgba(0,0,0,0.06); }

.nav__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

/* Language toggle */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}
.lang-btn:hover { background: var(--border); }
.lang-sep { color: var(--text-3); }
.lang-opt { transition: color 0.2s; }
.lang-opt.active { color: var(--text); }

/* Theme toggle */
.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 8px;
    color: var(--text-2);
    transition: color 0.2s, background 0.2s;
}
.theme-btn:hover { color: var(--text); background: var(--border); }
.icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }

/* Mobile menu overlay — lives outside nav to avoid stacking context issues */
.mobile-menu {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9998;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}
.mobile-menu__close {
    position: absolute;
    top: 20px; right: 20px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.mobile-menu__close:hover { background: rgba(255,255,255,0.15); color: #fff; }
.mobile-menu__link {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 14px 40px;
    color: rgba(255,255,255,0.8);
    border-radius: 12px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}
.mobile-menu__link:hover { color: #fff; background: rgba(255,255,255,0.08); }
[data-theme="light"] .mobile-menu { background: rgba(255,255,255,0.97); }
[data-theme="light"] .mobile-menu__close { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.6); }
[data-theme="light"] .mobile-menu__close:hover { background: rgba(0,0,0,0.12); color: #000; }
[data-theme="light"] .mobile-menu__link { color: rgba(0,0,0,0.8); }
[data-theme="light"] .mobile-menu__link:hover { color: #000; background: rgba(0,0,0,0.06); }

/* Burger */
.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: 8px;
    margin-left: auto;
    transition: background 0.2s;
}
.nav__burger:hover { background: var(--border); }
.nav__burger span {
    display: block;
    width: 20px; height: 1.5px;
    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
}
.nav__burger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.active span:nth-child(2) { opacity: 0; }
.nav__burger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 10px 20px;
    transition: all 0.2s;
    position: relative;
    will-change: transform;
}
.btn--sm { font-size: 0.82rem; padding: 8px 16px; }
/* Let's Talk button */
.nav__actions .btn--sm {
    background: #fff;
    color: #000;
    border-radius: 100px;
    font-weight: 600;
}
.nav__actions .btn--sm:hover {
    background: rgba(255,255,255,0.85);
    transform: translateY(-1px);
}
[data-theme="light"] .nav__actions .btn--sm {
    background: #000;
    color: #fff;
}
[data-theme="light"] .nav__actions .btn--sm:hover {
    background: #222;
}
.btn--lg { font-size: 0.95rem; padding: 14px 28px; }
.btn--full { width: 100%; }

.btn--primary {
    background: var(--text);
    color: var(--bg);
    box-shadow: 0 0 30px rgba(255,255,255,0.08);
}
.btn--primary:hover {
    box-shadow: 0 0 40px rgba(255,255,255,0.15);
    transform: translateY(-1px);
}
[data-theme="light"] .btn--primary { box-shadow: 0 0 30px rgba(0,0,0,0.08); }
[data-theme="light"] .btn--primary:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }

.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-h);
}
.btn--ghost:hover {
    background: var(--border);
    border-color: var(--border-h);
    transform: translateY(-1px);
}

/* ── HERO ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 100px 24px 60px;
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 900px;
}

/* Badge */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-2);
    background: var(--border);
    border: 1px solid var(--border-h);
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 36px;
    letter-spacing: 0.02em;
}
.badge__pulse {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Title */
.hero__title {
    font-size: clamp(3.2rem, 9vw, 7.5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 28px;
    display: block;
}
.hero__line {
    display: block;
    overflow: hidden;
}
.hero__line-inner {
    display: block;
}
.accent-text {
    font-style: normal;
    background: linear-gradient(120deg, #ffffff 0%, var(--accent) 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Subtitle */
.hero__sub {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: var(--text-2);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 36px;
}

/* CTA */
.hero__cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 64px;
}

/* Stats */
.hero__stats {
    display: flex;
    align-items: center;
    gap: 40px;
}
.stat { text-align: center; }
.stat__n {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 4px;
}
.stat__l {
    font-size: 0.75rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.stat__sep {
    width: 1px;
    height: 36px;
    background: var(--border-h);
    display: block;
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}
.hero__scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--text-3), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
    0%, 100% { transform: scaleY(0); transform-origin: top; }
    50%       { transform: scaleY(1); transform-origin: top; }
}

/* ── Section shared ── */
.section__head {
    margin-bottom: 64px;
}
.section__tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 16px;
}
.section__title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    max-width: 640px;
}

/* ── ABOUT ── */
.about__grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 72px;
    align-items: start;
}

/* Photo */
.about__photo { position: relative; }
.about__photo-wrap {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    border: 3px solid rgba(129,140,248,0.35);
    box-shadow: 0 0 0 8px rgba(129,140,248,0.06), 0 20px 48px rgba(0,0,0,0.4);
}
.about__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}
.about__text { min-width: 0; overflow: hidden; }
.about__lead {
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 20px;
}
.about__body {
    font-size: 0.95rem;
    color: var(--text-2);
    line-height: 1.8;
    margin-bottom: 32px;
}
/* Marquee */
.about__marquee {
    overflow: hidden;
    margin-top: 32px;
    max-width: 100%;
    -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.about__marquee-track {
    display: flex;
    gap: 10px;
    width: max-content;
    animation: tag-marquee 18s linear infinite;
}
.about__marquee:hover .about__marquee-track {
    animation-play-state: paused;
}
@keyframes tag-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Tags */
.tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-2);
    background: var(--border);
    border: 1px solid var(--border-h);
    padding: 5px 12px;
    border-radius: 100px;
    transition: color 0.2s, border-color 0.2s;
}
.tag:hover { color: var(--text); border-color: var(--accent); }
.tag--sm { font-size: 0.7rem; padding: 3px 10px; }

/* Timeline */
/* ── Horizontal Timeline ── */
.htimeline {
    margin-top: 32px;
    overflow-x: auto;
    padding-bottom: 8px;
}
.htimeline__track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    min-width: 560px;
}

/* Base line */
.htimeline__track::before {
    content: '';
    position: absolute;
    top: 38px;
    left: calc(12.5%);
    right: calc(12.5%);
    height: 1px;
    background: var(--border-h);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1.2s cubic-bezier(0.4,0,0.2,1);
}
.htimeline--visible .htimeline__track::before { transform: scaleX(1); }

/* Progress fill line */
.htimeline__fill {
    position: absolute;
    top: 38px;
    left: calc(12.5%);
    height: 1px;
    background: linear-gradient(90deg, var(--accent), rgba(129,140,248,0.4));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
    z-index: 1;
    pointer-events: none;
}

/* Items */
.htimeline__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 16px;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.htimeline--visible .htimeline__item:nth-child(1) { opacity:1; transform:translateY(0); transition-delay:0.3s; }
.htimeline--visible .htimeline__item:nth-child(2) { opacity:1; transform:translateY(0); transition-delay:0.6s; }
.htimeline--visible .htimeline__item:nth-child(3) { opacity:1; transform:translateY(0); transition-delay:0.9s; }
.htimeline--visible .htimeline__item:nth-child(4) { opacity:1; transform:translateY(0); transition-delay:1.2s; }

.htimeline__year {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 10px;
    transition: color 0.3s;
}
.htimeline__item--active .htimeline__year,
.htimeline__item:hover   .htimeline__year { color: var(--accent); }

/* Dot */
.htimeline__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border-h);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 3px var(--border);
    margin-bottom: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transform: scale(0);
    transition: background 0.3s, box-shadow 0.3s,
                transform 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
.htimeline--visible .htimeline__item:nth-child(1) .htimeline__dot { transform:scale(1); transition-delay:0.55s; }
.htimeline--visible .htimeline__item:nth-child(2) .htimeline__dot { transform:scale(1); transition-delay:0.85s; }
.htimeline--visible .htimeline__item:nth-child(3) .htimeline__dot { transform:scale(1); transition-delay:1.15s; }
.htimeline--visible .htimeline__item:nth-child(4) .htimeline__dot { transform:scale(1); transition-delay:1.45s; }

.htimeline__item--active .htimeline__dot {
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--border), 0 0 18px var(--accent-glow);
    transform: scale(1.25) !important;
}
.htimeline__item:hover .htimeline__dot {
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--border), 0 0 12px var(--accent-glow);
}

/* Ripple */
.htimeline__ripple {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.4s, transform 0.4s;
    pointer-events: none;
}
.htimeline__item--active .htimeline__ripple,
.htimeline__item:hover   .htimeline__ripple {
    opacity: 0.5;
    transform: scale(1);
}
.htimeline__item--active .htimeline__ripple {
    animation: ripple-pulse 2s ease-in-out infinite;
}
@keyframes ripple-pulse {
    0%,100% { opacity:0.5; transform:scale(1); }
    50%      { opacity:0.1; transform:scale(1.6); }
}

.htimeline__role {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-2);
    transition: color 0.3s;
}
.htimeline__item--active .htimeline__role,
.htimeline__item:hover   .htimeline__role { color: var(--text); }
.htimeline__desc {
    font-size: 0.68rem;
    font-style: italic;
    color: var(--text-3);
    line-height: 1.5;
    margin-top: 5px;
}

/* Detail card */
.htimeline__detail {
    margin-top: 28px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
    opacity: 0;
}
.htimeline__detail.open {
    max-height: 160px;
    opacity: 1;
}
.htimeline__detail-inner {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--card);
    border: 1px solid var(--border-h);
    border-radius: 16px;
    padding: 20px 24px;
    border-left: 3px solid var(--accent);
}
.htimeline__detail-emoji { font-size: 2rem; flex-shrink: 0; line-height: 1; }
.htimeline__detail-year  {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}
.htimeline__detail-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.htimeline__detail-desc {
    font-size: 0.84rem;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 10px;
}
.htimeline__detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.htimeline__detail-tags .tag { font-size: 0.7rem; padding: 3px 10px; }

/* ── SERVICES ── */
.svc__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: var(--border);
    gap: 1px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.svc-card {
    background: var(--bg);
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: background var(--transition);
}
.svc-card:hover { background: var(--card); }
.svc-card--wide { grid-column: 1 / -1; }

.svc-card__n {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-3);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 20px;
}
.svc-card__icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-h);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    margin-bottom: 20px;
    transition: border-color 0.2s, color 0.2s;
}
.svc-card:hover .svc-card__icon {
    border-color: var(--accent);
    color: var(--accent);
}
.svc-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.svc-card__desc {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.7;
}

/* Card glow effect (Vercel-style mouse follow) */
.glow-card {
    position: relative;
    overflow: hidden;
}
.glow-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), var(--accent-glow), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 0;
}
.glow-card:hover::before { opacity: 1; }
.glow-card > * { position: relative; z-index: 1; }

/* ── WORK ── */
.work__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.proj-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition), transform 0.3s;
    background: var(--card);
}
.proj-card:hover {
    border-color: var(--border-h);
    transform: translateY(-4px);
}

.proj-card__media {
    aspect-ratio: 16/9;
    background: var(--bg-alt);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.proj-card__ph { color: var(--text-3); }

.proj-card__ov {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
}
.proj-card:hover .proj-card__ov { opacity: 1; }
[data-theme="light"] .proj-card__ov { background: rgba(0,0,0,0.5); }

.proj-card__info { padding: 24px; }
.proj-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.proj-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.proj-card__desc {
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* ── CONTACT ── */
.contact__sub {
    font-size: 1rem;
    color: var(--text-2);
    margin-top: 16px;
}
.contact__grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 48px;
    align-items: start;
}

/* Form */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form__group { width: 100%; }
.form__input {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border-h);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.875rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}
.form__input::placeholder { color: var(--text-3); }
.form__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form__textarea { resize: vertical; min-height: 120px; }
.form__select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
[data-theme="light"] .form__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.form__select option { background: var(--card); color: var(--text); }

.form__success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 10px;
    font-size: 0.875rem;
    color: var(--green);
}

/* Contact side */
.contact__side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.clink {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    transition: border-color var(--transition), transform 0.2s;
}
.clink:hover { border-color: var(--border-h); transform: translateY(-2px); }
.clink__icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    flex-shrink: 0;
}
.clink__label { font-size: 0.72rem; color: var(--text-3); margin-bottom: 2px; }
.clink__val   { font-size: 0.9rem; font-weight: 600; }
.clink__arrow { color: var(--text-3); margin-left: auto; flex-shrink: 0; }

.contact__avail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-2);
    padding: 14px 0;
}
.avail-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

/* ── FOOTER ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
}
.footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer__copy {
    font-size: 0.82rem;
    color: var(--text-3);
}
.footer__heart {
    color: #ef4444;
    display: inline-block;
    animation: heart-beat 1.4s ease-in-out infinite;
}
@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    14%       { transform: scale(1.3); }
    28%       { transform: scale(1); }
    42%       { transform: scale(1.2); }
    56%       { transform: scale(1); }
}
.footer__top {
    font-size: 0.82rem;
    color: var(--text-3);
    transition: color 0.2s;
}
.footer__top:hover { color: var(--text); }

/* ── Reveal animations (initial state — JS adds .visible) ── */
.reveal-up  { opacity: 0; transform: translateY(32px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-fade { opacity: 0; transition: opacity 0.6s ease; }
.reveal-right { opacity: 0; transform: translateX(-24px); transition: opacity 0.7s ease, transform 0.7s ease; }

.reveal-up.visible,
.reveal-fade.visible,
.reveal-right.visible {
    opacity: 1;
    transform: none;
}

/* Stagger children */
.svc__grid .svc-card:nth-child(1) { transition-delay: 0s; }
.svc__grid .svc-card:nth-child(2) { transition-delay: 0.07s; }
.svc__grid .svc-card:nth-child(3) { transition-delay: 0.14s; }
.svc__grid .svc-card:nth-child(4) { transition-delay: 0.21s; }
.svc__grid .svc-card:nth-child(5) { transition-delay: 0.28s; }

.work__grid .proj-card:nth-child(1) { transition-delay: 0s; }
.work__grid .proj-card:nth-child(2) { transition-delay: 0.1s; }
.work__grid .proj-card:nth-child(3) { transition-delay: 0.2s; }

.timeline__item:nth-child(1) { transition-delay: 0s; }
.timeline__item:nth-child(2) { transition-delay: 0.1s; }
.timeline__item:nth-child(3) { transition-delay: 0.2s; }
.timeline__item:nth-child(4) { transition-delay: 0.3s; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .about__grid  { grid-template-columns: 1fr; gap: 40px; }
    .about__photo-wrap { width: 220px; height: 220px; }
    .htimeline__track { grid-template-columns: repeat(4, 200px); }
    .work__grid   { grid-template-columns: repeat(2, 1fr); }
    .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .section { padding: 80px 0; }

    /* Chat widget — fit screen, no zoom */
    .chat-widget { bottom: 20px; right: 16px; }
    .chat-panel {
        width: calc(100vw - 32px);
        right: 0;
        left: auto;
        height: 70vh;
        max-height: 520px;
    }

    /* Nav */
    .nav { top: 12px; left: 16px; right: 16px; transform: none; width: auto; border-radius: 20px; }
    .nav--scrolled { top: 8px; }
    .nav__inner { padding: 8px 8px 8px 16px; }
    .nav__links { display: none; }
    .nav__actions .btn--sm { display: none; }
    .nav__burger { display: flex; z-index: 9999; }

    /* Hero */
    .hero { padding: 100px 20px 60px; }
    .hero__title { font-size: clamp(2.8rem, 13vw, 4.5rem); }
    .hero__stats { gap: 24px; }
    .stat__n { font-size: 1.5rem; }

    /* Services */
    .svc__grid { grid-template-columns: 1fr; }
    .svc-card--wide { grid-column: 1; }
    .svc-card { padding: 28px; }

    /* Work */
    .work__grid { grid-template-columns: 1fr; }

    /* Form */
    .form__row { grid-template-columns: 1fr; }

    /* Footer */
    .footer__inner { flex-direction: column; gap: 12px; text-align: center; }

    /* Section head */
    .section__title { font-size: clamp(1.75rem, 7vw, 2.5rem); }
}


/* ============================================================
   CHAT WIDGET — Apple-inspired
   ============================================================ */
.chat-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    font-family: 'Noto Sans', 'Inter', sans-serif;
}

/* ── Toggle button ── */
.chat-toggle {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(255,255,255,0.6);
    box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}
.chat-toggle:hover {
    transform: scale(1.07) !important;
    box-shadow: 0 14px 40px rgba(0,0,0,0.65);
    animation-play-state: paused !important;
}

/* Cat life cycle — only when closed */
.chat-widget:not(.open) .chat-toggle {
    animation: cat-life 11s ease-in-out infinite;
}
@keyframes cat-life {
    0%, 50%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    52%       { transform: rotate(-20deg); }
    54%       { transform: rotate(16deg); }
    56%       { transform: rotate(-16deg); }
    58%       { transform: rotate(12deg); }
    60%       { transform: rotate(0deg); }
    65%       { transform: translateY(0); opacity: 1; }
    72%       { transform: translateY(90px); opacity: 0; }
    80%       { transform: translateY(90px); opacity: 0; }
    88%       { transform: translateY(-14px); opacity: 1; }
    92%       { transform: translateY(6px); }
    95%       { transform: translateY(-4px); }
    98%       { transform: translateY(2px); }
    100%      { transform: translateY(0); opacity: 1; }
}

/* Spinning aurora ring — shows when open */
.chat-toggle::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #818cf8, #34d399, #60a5fa, #f472b6, #818cf8);
    opacity: 0;
    animation: ring-spin 3s linear infinite;
    transition: opacity 0.4s;
    z-index: -1;
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 100%);
}
.chat-widget.open .chat-toggle::before { opacity: 1; }
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* Cat wink */
.cat-wink-eye {
    transform-box: fill-box;
    transform-origin: center;
    animation: cat-wink 4s ease-in-out infinite;
}
@keyframes cat-wink {
    0%, 80%   { transform: scaleY(1); }
    84%       { transform: scaleY(0.08); }
    88%, 100% { transform: scaleY(1); }
}

.chat-toggle__icon { transition: opacity 0.22s ease, transform 0.22s ease; }
.chat-toggle__icon--close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}
.chat-widget.open .chat-toggle__icon--open  { opacity: 0; transform: rotate(90deg) scale(0.6); }
.chat-widget.open .chat-toggle__icon--close { opacity: 1; transform: none; }

/* Notification badge */
.chat-badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid var(--bg);
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s, transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.chat-badge.show { opacity: 1; transform: scale(1); }
.chat-widget.open .chat-badge { opacity: 0; transform: scale(0); }

/* Nudge label */
.chat-nudge {
    position: absolute;
    bottom: 14px; right: 72px;
    background: var(--card);
    border: 1px solid var(--border-h);
    border-radius: 100px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.chat-nudge::after {
    content: '';
    position: absolute;
    right: -5px; top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: var(--border-h);
}
.chat-nudge.show { opacity: 1; transform: translateX(0); pointer-events: all; }

/* ── Panel ── */
.chat-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 380px;
    height: 540px;
    background: rgba(14,14,18,0.96);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow:
        0 0 0 0.5px rgba(255,255,255,0.05) inset,
        0 40px 100px rgba(0,0,0,0.7),
        0 8px 32px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.4,0,0.2,1), transform 0.32s cubic-bezier(0.34,1.56,0.64,1);
    transform-origin: bottom right;
}
.chat-widget.open .chat-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}
[data-theme="light"] .chat-panel {
    background: rgba(250,250,253,0.97);
    border-color: rgba(0,0,0,0.07);
    box-shadow: 0 40px 100px rgba(0,0,0,0.15), 0 8px 32px rgba(0,0,0,0.08);
}

/* Aurora top accent line */
.chat-panel::after {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129,140,248,0.6), rgba(96,165,250,0.5), rgba(52,211,153,0.4), transparent);
    border-radius: 0 0 1px 1px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s;
}
.chat-widget.open .chat-panel::after { opacity: 1; }

/* ── Header ── */
.chat-panel__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 20px 18px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
[data-theme="light"] .chat-panel__header { border-bottom-color: rgba(0,0,0,0.06); }
.chat-panel__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
    box-shadow: 0 0 0 2px rgba(129,140,248,0.4), 0 4px 16px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-panel__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.chat-panel__avatar svg { width: 34px; height: 34px; }
.chat-panel__info { flex: 1; min-width: 0; }
.chat-panel__name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.chat-panel__status {
    font-size: 0.72rem;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    transition: color 0.3s;
}
.chat-panel__status.thinking { color: var(--accent); }
.chat-panel__dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    animation: pulse-dot 2.4s ease-in-out infinite;
    transition: background 0.3s;
}
.chat-panel__status.thinking .chat-panel__dot { background: var(--accent); }
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50%       { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

/* ── Messages ── */
.chat-panel__messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
    position: relative;
    z-index: 1;
}
.chat-msg {
    display: flex;
    opacity: 0;
    transform: translateY(8px);
    animation: msg-in 0.28s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes msg-in { to { opacity: 1; transform: translateY(0); } }
.chat-msg--bot  { justify-content: flex-start; }
.chat-msg--user { justify-content: flex-end; }

/* Group spacing: consecutive same-sender msgs closer together */
.chat-msg--bot  + .chat-msg--bot  { margin-top: -2px; }
.chat-msg--user + .chat-msg--user { margin-top: -2px; }
.chat-msg--bot  + .chat-msg--user,
.chat-msg--user + .chat-msg--bot  { margin-top: 8px; }

.chat-msg__bubble {
    max-width: 82%;
    padding: 11px 15px;
    border-radius: 20px;
    font-size: 0.875rem;
    line-height: 1.6;
    letter-spacing: -0.01em;
}
.chat-msg--bot .chat-msg__bubble {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.88);
    border-bottom-left-radius: 6px;
}
[data-theme="light"] .chat-msg--bot .chat-msg__bubble {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.07);
    color: rgba(0,0,0,0.85);
}
.chat-msg--user .chat-msg__bubble {
    background: linear-gradient(145deg, #7c7fff, #5f5de8);
    color: #fff;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 20px rgba(95,93,232,0.4);
}

/* Markdown */
.chat-msg__bubble strong { font-weight: 700; }
.chat-msg__bubble em     { font-style: italic; opacity: 0.85; }
.chat-msg__bubble code   {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    background: rgba(129,140,248,0.14);
    border: 1px solid rgba(129,140,248,0.2);
    border-radius: 5px;
    padding: 1px 5px;
}
.chat-msg__bubble ul,
.chat-msg__bubble ol { padding-left: 18px; margin: 6px 0; }
.chat-msg__bubble li { margin: 3px 0; }
.chat-msg__bubble p  { margin: 5px 0; }
.chat-msg__bubble p:first-child { margin-top: 0; }
.chat-msg__bubble p:last-child  { margin-bottom: 0; }
.chat-msg__bubble a  { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Typing indicator */
.chat-typing .chat-msg__bubble {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 14px 18px;
}
.chat-typing .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    animation: typing-bounce 1.3s ease-in-out infinite;
}
.chat-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
    0%, 80%, 100% { transform: translateY(0) scale(0.8); opacity: 0.4; }
    40%            { transform: translateY(-5px) scale(1); opacity: 1; }
}

/* Quick-reply chips */
.chat-chips {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px 14px;
    flex-shrink: 0;
}
.chat-chip {
    background: rgba(129,140,248,0.08);
    border: 1px solid rgba(129,140,248,0.2);
    color: rgba(129,140,248,0.9);
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 0.77rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
    letter-spacing: -0.01em;
}
.chat-chip:hover {
    background: rgba(129,140,248,0.18);
    border-color: rgba(129,140,248,0.5);
    transform: translateY(-1px);
}

/* ── Footer / Input ── */
.chat-panel__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
[data-theme="light"] .chat-panel__footer {
    border-top-color: rgba(0,0,0,0.06);
    background: rgba(0,0,0,0.02);
}
.chat-input {
    flex: 1;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    padding: 11px 18px;
    font-size: 16px; /* ≥16px prevents iOS auto-zoom */
    font-family: inherit;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
[data-theme="light"] .chat-input {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
}
.chat-input::placeholder { color: rgba(255,255,255,0.28); }
[data-theme="light"] .chat-input::placeholder { color: rgba(0,0,0,0.3); }
.chat-input:focus {
    border-color: rgba(129,140,248,0.5);
    background: rgba(129,140,248,0.06);
    box-shadow: 0 0 0 3px rgba(129,140,248,0.1);
}
.chat-send {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #818cf8, #5f5de8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(95,93,232,0.45);
}
.chat-send:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(95,93,232,0.6);
}
.chat-send:disabled { opacity: 0.3; box-shadow: none; }

/* ── Mobile ── */
@media (max-width: 480px) {
    .chat-widget { bottom: 16px; right: 16px; }
    .chat-panel  { width: calc(100vw - 32px); right: 0; height: 70vh; max-height: 520px; border-radius: 24px; }
    .chat-nudge  { display: none; }
}
