:root {
    --bg: #0b1210;
    --surface: #121a17;
    --surface-2: #182420;
    --text: #eef3f0;
    --muted: #94a39c;
    --accent: #22c55e;
    --accent-2: #0d9488;
    --border: #22302a;
    --radius: 14px;
}

@view-transition {
    navigation: auto;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding-top: 60px; padding-bottom: 60px; }
.section-title { font-size: 1.6rem; margin-bottom: 24px; }
.page-title { font-size: 2rem; margin-bottom: 16px; animation: fadeInUp 0.6s ease both; }

a { color: inherit; text-decoration: none; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1);
}
[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}
@keyframes blobMove {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.08); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.35); }
    50% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
}
@keyframes rippleAnim {
    from { transform: scale(0); opacity: 0.45; }
    to { transform: scale(3.2); opacity: 0; }
}
@keyframes underlineGrow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ---------- Header ---------- */
.site-header {
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0;
    background: rgba(11,18,16,0.75);
    backdrop-filter: blur(10px);
    z-index: 20;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
    box-shadow: 0 8px 24px -12px rgba(0,0,0,0.5);
    background: rgba(11,18,16,0.92);
}
.nav { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 18px; }
.logo {
    font-weight: 800; font-size: 1.3rem;
    animation: fadeIn 0.6s ease both;
}
.logo span {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { list-style: none; display: flex; gap: 28px; align-items: center; margin: 0; padding: 0; }
.nav-links li { position: relative; animation: fadeIn 0.6s ease both; }
.nav-links a { position: relative; padding-bottom: 4px; transition: color 0.25s ease; }
.nav-links li:not(:last-child) a::after {
    content: ""; position: absolute; right: 0; left: 0; bottom: -2px; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0); transform-origin: center;
    transition: transform 0.3s ease;
}
.nav-links li:not(:last-child) a:hover::after { transform: scaleX(1); }
.nav-links a:hover { color: var(--accent); }
.btn-nav {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #08130f; padding: 8px 18px; border-radius: 999px; font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-nav:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 20px -8px rgba(34,197,94,0.6); }

/* ---------- Mobile menu toggle ---------- */
.menu-toggle {
    display: none;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 38px; height: 38px; padding: 0;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
    cursor: pointer; z-index: 30;
}
.menu-toggle span {
    display: block; width: 18px; height: 2px; margin: 0 auto;
    background: var(--text); border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 15;
}
.nav-backdrop.is-open { opacity: 1; pointer-events: auto; }

body.no-scroll { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding-top: 100px;
    padding-bottom: 50px;
    text-align: center;
    overflow: hidden;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    z-index: 0;
    animation: blobMove 14s ease-in-out infinite, floatY 8s ease-in-out infinite;
    pointer-events: none;
    transition: transform 0.3s ease-out;
}
.blob-1 { width: 320px; height: 320px; background: var(--accent); top: -80px; right: -60px; }
.blob-2 { width: 260px; height: 260px; background: var(--accent-2); bottom: -60px; left: -40px; animation-delay: -4s, -2s; }
.blob-3 { width: 180px; height: 180px; background: #86efac; top: 40%; left: 50%; animation-delay: -8s, -5s; opacity: 0.3; }

.hero-text { position: relative; z-index: 1; }
.eyebrow {
    color: var(--accent); font-weight: 600; margin-bottom: 8px;
    animation: fadeInUp 0.6s ease both;
    display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); display: inline-block;
    animation: glowPulse 2s ease-in-out infinite;
}
.hero h1 {
    font-size: clamp(1.5rem, 4.2vw + 0.6rem, 2.4rem);
    max-width: 800px; margin: 0 auto 20px;
    animation: fadeInUp 0.7s ease 0.1s both;
    word-break: break-word;
}
.hero h1 span {
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shimmer 5s linear infinite;
}
.hero-sub {
    color: var(--muted); max-width: 620px; margin: 0 auto 30px;
    animation: fadeInUp 0.7s ease 0.2s both;
}
.hero-actions {
    display: flex; gap: 14px; justify-content: center;
    animation: fadeInUp 0.7s ease 0.3s both;
}

/* ---------- Buttons ---------- */
.btn {
    position: relative;
    overflow: hidden;
    display: inline-block; padding: 12px 26px; border-radius: 10px; font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}
.btn-primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #08130f; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -10px rgba(34,197,94,0.55); }
.btn-outline { border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.ripple {
    position: absolute; width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,0.5); transform: translate(-50%, -50%);
    animation: rippleAnim 0.6s ease-out forwards;
    pointer-events: none;
}

/* ---------- Grid / Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; display: block;
    transition: transform 0.35s cubic-bezier(.2,.8,.3,1), border-color 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
    transform: translateY(-8px) scale(1.015);
    border-color: var(--accent);
    box-shadow: 0 20px 40px -20px rgba(34,197,94,0.4);
}
.card-img { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform 0.5s ease; }
.card:hover .card-img { transform: scale(1.06); }
.card-img.placeholder {
    background: linear-gradient(135deg, var(--surface-2), var(--border));
    background-size: 200% 200%;
    animation: shimmer 6s ease infinite;
}
.card-body { padding: 18px; }
.card-body h3 { margin: 0 0 8px; transition: color 0.25s ease; }
.card:hover .card-body h3 { color: var(--accent); }
.card-body p { color: var(--muted); font-size: 0.92rem; margin: 0 0 12px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tag {
    background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px;
    border-radius: 999px; font-size: 0.78rem; color: var(--muted);
    transition: border-color 0.25s ease, color 0.25s ease;
}
.card:hover .tag { border-color: var(--accent-2); color: var(--text); }

/* ---------- Skills ---------- */
.skills { display: flex; flex-direction: column; gap: 18px; max-width: 500px; }
.skill-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.9rem; }
.skill-bar { background: var(--surface-2); border-radius: 999px; height: 8px; overflow: hidden; }
.skill-fill {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    height: 100%; border-radius: 999px;
    transition: width 1.1s cubic-bezier(.2,.8,.2,1);
}

/* ---------- CTA ---------- */
.cta {
    text-align: center;
    position: relative;
    border-radius: var(--radius);
    background: radial-gradient(circle at 50% 0%, rgba(34,197,94,0.12), transparent 60%);
}
.cta h2 { margin-bottom: 20px; }

/* ---------- Project detail ---------- */
.back-link {
    color: var(--muted); display: inline-block; margin-bottom: 18px;
    transition: color 0.25s ease, transform 0.25s ease;
}
.back-link:hover { color: var(--accent); transform: translateX(-4px); }
.detail-img { width: 100%; border-radius: var(--radius); margin: 20px 0; animation: fadeInUp 0.6s ease both; }
.detail-links { display: flex; gap: 12px; margin-bottom: 24px; }
.prose { color: #cfd3da; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 24px; }
.gallery img { width: 100%; border-radius: 10px; transition: transform 0.4s ease, box-shadow 0.4s ease; }
.gallery img:hover { transform: scale(1.03); box-shadow: 0 14px 30px -14px rgba(34,197,94,0.5); }

/* ---------- Contact form ---------- */
.narrow { max-width: 560px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: var(--muted); }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px 14px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 10px; color: var(--text);
    font-family: inherit; font-size: 0.95rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
    transform: translateY(-1px);
}
.error { color: #ff6c6c; font-size: 0.85rem; margin-top: 4px; }

.alert {
    background: rgba(34,197,94,0.15); border: 1px solid var(--accent);
    padding: 12px 18px; border-radius: 10px; margin: 18px 0;
    animation: fadeInUp 0.5s ease both;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 30px 0; }
.footer-inner { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.9rem; }
.socials { display: flex; gap: 16px; }
.socials a { transition: color 0.25s ease, transform 0.25s ease; display: inline-block; }
.socials a:hover { color: var(--accent); transform: translateY(-2px); }

/* ---------- Scrollbar flourish ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed; top: 0; right: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 100;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 8px rgba(34,197,94,0.6);
}

/* ---------- Language switcher ---------- */
.lang-switch { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; border: 1px solid var(--border); }
.lang-pill {
    border: none; background: transparent; color: var(--muted);
    font-family: inherit; font-size: 0.78rem; font-weight: 700;
    padding: 5px 12px; border-radius: 999px; cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}
.lang-pill:hover { color: var(--text); transform: translateY(-1px); }
.lang-pill.active {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #08130f;
}

/* ---------- Typewriter cursor ---------- */
.blink-cursor {
    display: inline-block; width: 2px; height: 1em; margin-inline-start: 3px;
    background: var(--accent); vertical-align: middle;
    animation: blinkCursor 1s step-end infinite;
}
@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---------- Card tilt smoothing ---------- */
[data-tilt] .card { transition: transform 0.15s ease-out, border-color 0.35s ease, box-shadow 0.35s ease; will-change: transform; }
[data-tilt] .card:hover { border-color: var(--accent); box-shadow: 0 20px 40px -20px rgba(34,197,94,0.4); }

/* ---------- Animated dotted backdrop ---------- */
body::before {
    content: "";
    position: fixed; inset: 0; z-index: -1;
    background-image: radial-gradient(rgba(34,197,94,0.14) 1px, transparent 1px);
    background-size: 26px 26px;
    animation: gridDrift 40s linear infinite;
    opacity: 0.5;
}
@keyframes gridDrift {
    from { background-position: 0 0; }
    to { background-position: 260px 260px; }
}
/* ---------- Availability badge ---------- */
.availability-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 7px 16px; border-radius: 999px; font-size: 0.82rem; color: var(--muted);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease both;
}
.dot-live {
    width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
    display: inline-block; animation: glowPulse 2s ease-in-out infinite;
}

/* ---------- Avatar ---------- */
.avatar-wrap {
    position: relative; width: 130px; height: 130px; margin: 0 auto 28px;
    animation: fadeInUp 0.7s ease 0.05s both;
}
.avatar-ring {
    width: 100%; height: 100%; border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), var(--accent-2), #86efac, var(--accent));
    padding: 4px;
    animation: spin 8s linear infinite;
    display: flex; align-items: center; justify-content: center;
}
.avatar {
    width: 100%; height: 100%; border-radius: 50%;
    background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.8rem; color: var(--text);
    animation: spin 8s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-chip {
    position: absolute;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); font-size: 0.72rem; font-weight: 600;
    padding: 5px 11px; border-radius: 999px;
    box-shadow: 0 8px 18px -8px rgba(0,0,0,0.5);
    animation: floatY 5s ease-in-out infinite;
}
.chip-1 { top: -6px; right: -46px; animation-delay: 0s; }
.chip-2 { bottom: 6px; left: -58px; animation-delay: -1.5s; }
.chip-3 { bottom: -14px; right: 6px; animation-delay: -3s; }

/* ---------- Hero stats ---------- */
.hero-stats {
    display: flex; justify-content: center; gap: 48px; margin-top: 44px;
}
.stat { text-align: center; }
.stat-num {
    display: block; font-size: 2rem; font-weight: 800;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--muted); font-size: 0.82rem; }

/* ---------- Scroll cue ---------- */
.scroll-cue {
    display: flex; justify-content: center; margin-top: 50px;
    animation: fadeIn 1s ease 0.8s both;
}
.scroll-cue span {
    width: 24px; height: 38px; border: 2px solid var(--border); border-radius: 999px;
    position: relative; display: block;
}
.scroll-cue span::before {
    content: ""; position: absolute; top: 6px; left: 50%; width: 4px; height: 8px;
    background: var(--accent); border-radius: 999px; transform: translateX(-50%);
    animation: scrollDot 1.8s ease infinite;
}
@keyframes scrollDot {
    0% { top: 6px; opacity: 1; }
    70% { top: 20px; opacity: 0; }
    100% { top: 6px; opacity: 0; }
}

/* ---------- Tech ticker ---------- */
.ticker-wrap {
    overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    padding: 18px 0; margin: 30px 0; background: var(--surface);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
    display: flex; width: max-content; gap: 14px;
    animation: tickerScroll 30s linear infinite;
}
.ticker-item { font-weight: 700; color: var(--muted); white-space: nowrap; font-size: 0.95rem; }
.ticker-dot { color: var(--accent); }
@keyframes tickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ---------- Spotlight project ---------- */
.spotlight-card {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(.2,.8,.3,1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.spotlight-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 24px 50px -24px rgba(34,197,94,0.45);
}
.spotlight-media { min-height: 260px; overflow: hidden; }
.spotlight-media img, .spotlight-media.placeholder {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.6s ease;
}
.spotlight-media.placeholder { background: linear-gradient(135deg, var(--surface-2), var(--border)); min-height: 260px; }
.spotlight-card:hover .spotlight-media img { transform: scale(1.05); }
.spotlight-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.spotlight-tag {
    color: var(--accent); font-weight: 700; font-size: 0.8rem; margin-bottom: 10px;
    display: inline-flex; align-items: center; gap: 6px;
}
.spotlight-tag::before { content: "\2726"; }
.spotlight-body h3 { font-size: 1.5rem; margin: 0 0 12px; }
.spotlight-body p { color: var(--muted); margin: 0 0 16px; }
.spotlight-cta { color: var(--accent); font-weight: 700; margin-top: 18px; display: inline-block; }
.spotlight-card:hover .spotlight-cta { text-decoration: underline; }

.see-all-wrap { text-align: center; margin-top: 30px; }

/* ---------- Skill chips ---------- */
.skill-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.skill-chip {
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}
.skill-chip:hover {
    transform: translateY(-3px);
    border-color: var(--accent); color: var(--accent);
    box-shadow: 0 10px 22px -12px rgba(34,197,94,0.5);
}

/* ---------- CTA card ---------- */
.cta-card {
    text-align: center; padding: 56px 30px; border-radius: 20px;
    background: linear-gradient(145deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    position: relative; overflow: hidden;
}
.cta-card::before {
    content: ""; position: absolute; inset: -40%;
    background: radial-gradient(circle at 30% 30%, rgba(34,197,94,0.18), transparent 60%);
    animation: floatY 10s ease-in-out infinite;
}
.cta-card h2, .cta-card p, .cta-card .btn { position: relative; z-index: 1; }
.cta-card p { color: var(--muted); margin-bottom: 26px; }

@media (max-width: 860px) {
    .spotlight-card { grid-template-columns: 1fr; }
    .spotlight-media { min-height: 200px; }

    .menu-toggle { display: flex; }

    .nav-links {
        position: fixed; top: 0; inset-inline-end: 0; height: 100dvh; width: min(78vw, 320px);
        background: var(--surface); border-inline-start: 1px solid var(--border);
        flex-direction: column; align-items: flex-start; justify-content: flex-start;
        gap: 22px; padding: 90px 26px 26px;
        transform: translateX(100%); transition: transform 0.35s cubic-bezier(.2,.8,.3,1);
        z-index: 20; overflow-y: auto;
    }
    html[dir="rtl"] .nav-links { transform: translateX(-100%); }
    .nav-links.is-open { transform: translateX(0); }
    html[dir="rtl"] .nav-links.is-open { transform: translateX(0); }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; font-size: 1.05rem; }
    .btn-nav { display: inline-block; text-align: center; }
    .lang-switch { width: fit-content; }

    .hero { padding-top: 70px; padding-bottom: 30px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .section { padding-top: 44px; padding-bottom: 44px; }

    .hero-sub { font-size: 0.95rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; text-align: center; }
    .footer-inner { flex-direction: column; gap: 10px; text-align: center; }
    .blob { display: none; }
    .hero-stats { gap: 22px; }
    .stat-num { font-size: 1.5rem; }
    .avatar-chip { display: none; }

    .grid { grid-template-columns: 1fr; }
    .page-title { font-size: 1.5rem; }
    .spotlight-body { padding: 22px; }
    .spotlight-body h3 { font-size: 1.2rem; }
    .cta-card { padding: 38px 20px; }
    .cta-card h2 { font-size: 1.3rem; }

    .detail-links { flex-direction: column; }
    .detail-links .btn { width: 100%; text-align: center; }
    .gallery { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
    .logo { font-size: 1.1rem; }
    .avatar-wrap { width: 100px; height: 100px; }
    .gallery { grid-template-columns: 1fr; }
}

/* ---------- Floating quick-contact button ---------- */
.fab-wrap {
    position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 40;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.fab-toggle {
    width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #08130f; position: relative;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 14px 30px -10px rgba(34,197,94,0.6);
    animation: fabPulse 2.6s ease-in-out infinite;
    transition: transform 0.25s ease;
}
.fab-toggle:hover { transform: scale(1.06); }
.fab-toggle svg { width: 26px; height: 26px; position: absolute; transition: opacity 0.25s ease, transform 0.25s ease; }
.fab-icon-close { opacity: 0; transform: rotate(-45deg); }
.fab-toggle.is-open .fab-icon-chat { opacity: 0; transform: rotate(45deg); }
.fab-toggle.is-open .fab-icon-close { opacity: 1; transform: rotate(0); }
@keyframes fabPulse {
    0%, 100% { box-shadow: 0 14px 30px -10px rgba(34,197,94,0.6); }
    50% { box-shadow: 0 14px 30px -6px rgba(34,197,94,0.85); }
}

.fab-menu {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.fab-item {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px -10px rgba(0,0,0,0.6);
    opacity: 0; transform: translateY(16px) scale(0.6);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.2,.8,.3,1), border-color 0.25s ease, color 0.25s ease;
}
.fab-item svg { width: 22px; height: 22px; }
.fab-wrap.is-open .fab-item {
    opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.fab-wrap.is-open .fab-item:nth-child(1) { transition-delay: 0.02s; }
.fab-wrap.is-open .fab-item:nth-child(2) { transition-delay: 0.07s; }
.fab-wrap.is-open .fab-item:nth-child(3) { transition-delay: 0.12s; }
.fab-wrap.is-open .fab-item:nth-child(4) { transition-delay: 0.17s; }

.fab-whatsapp:hover { border-color: #25d366; color: #25d366; }
.fab-telegram:hover { border-color: #29a9eb; color: #29a9eb; }
.fab-bale:hover { border-color: var(--accent); color: var(--accent); }
.fab-instagram:hover { border-color: #e1306c; color: #e1306c; }

@media (max-width: 640px) {
    .fab-wrap { bottom: 16px; inset-inline-end: 16px; }
    .fab-toggle { width: 52px; height: 52px; }
    .fab-item { width: 44px; height: 44px; }
}

/* ---------- Quick contact chips (contact page) ---------- */
.quick-contact-label { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
.quick-contact-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.quick-contact-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    padding: 10px 18px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
    transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.quick-contact-chip svg { width: 18px; height: 18px; flex-shrink: 0; }
.quick-contact-chip:hover {
    transform: translateY(-3px);
    border-color: var(--accent); color: var(--accent);
    box-shadow: 0 10px 22px -12px rgba(34,197,94,0.5);
}
.divider-or {
    display: flex; align-items: center; gap: 14px; color: var(--muted);
    font-size: 0.82rem; margin: 8px 0 26px;
}
.divider-or::before, .divider-or::after {
    content: ""; flex: 1; height: 1px; background: var(--border);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
