/* ============================================================
   عارف محمودپور — سیستم طراحی وب‌سایت شخصی
   فونت نمایشی: Lalezar | فونت متن: Vazirmatn
   ============================================================ */

/* ------------------------------------------------------ Fonts */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lalezar';
    src: url('../fonts/Lalezar-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ------------------------------------------------------ Tokens */
:root {
    --font-body: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    --font-display: 'Lalezar', 'Vazirmatn', system-ui, sans-serif;

    /* تم تیره (پیش‌فرض) */
    --bg: #070a14;
    --bg-2: #0a0f1e;
    --surface: #0f1526;
    --surface-2: #141b30;
    --elev: #18203a;
    --border: rgba(255, 255, 255, .09);
    --border-2: rgba(255, 255, 255, .16);
    --text: #e9edf7;
    --text-2: #a8b2c8;
    --text-3: #717c99;

    --brand-1: #8b7cff;
    --brand-2: #4b8cff;
    --brand-3: #22d3ee;
    --brand: #7c8cff;
    --brand-soft: rgba(124, 140, 255, .14);
    --grad: linear-gradient(135deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
    --grad-soft: linear-gradient(135deg, rgba(139, 124, 255, .18), rgba(34, 211, 238, .12));

    --ok: #34d399;
    --warn: #fbbf24;
    --danger: #f87171;

    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 28px;
    --radius-pill: 999px;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px -18px rgba(0, 0, 0, .8);
    --shadow-2: 0 30px 80px -30px rgba(0, 0, 0, .85);
    --glow: 0 0 0 1px rgba(124, 140, 255, .25), 0 18px 50px -22px rgba(124, 140, 255, .55);

    --container: 1200px;
    --header-h: 74px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    color-scheme: dark;
}

/* تم روشن */
:root[data-theme="light"] {
    --bg: #f6f7fb;
    --bg-2: #eef1f8;
    --surface: #ffffff;
    --surface-2: #f4f6fc;
    --elev: #ffffff;
    --border: rgba(12, 18, 40, .1);
    --border-2: rgba(12, 18, 40, .18);
    --text: #0d1428;
    --text-2: #4e5876;
    --text-3: #7b849e;

    --brand-1: #6d5cf0;
    --brand-2: #2f7bff;
    --brand-3: #10b6d6;
    --brand: #5b6cf0;
    --brand-soft: rgba(91, 108, 240, .1);
    --grad-soft: linear-gradient(135deg, rgba(109, 92, 240, .12), rgba(16, 182, 214, .08));
    --shadow-1: 0 1px 2px rgba(16, 24, 50, .06), 0 12px 30px -18px rgba(16, 24, 50, .3);
    --shadow-2: 0 30px 70px -30px rgba(16, 24, 50, .35);
    --glow: 0 0 0 1px rgba(91, 108, 240, .18), 0 18px 44px -22px rgba(91, 108, 240, .4);
    color-scheme: light;
}

/* احترام به تنظیم سیستم وقتی جاوااسکریپت غیرفعال است */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f6f7fb;
        --bg-2: #eef1f8;
        --surface: #ffffff;
        --surface-2: #f4f6fc;
        --elev: #ffffff;
        --border: rgba(12, 18, 40, .1);
        --border-2: rgba(12, 18, 40, .18);
        --text: #0d1428;
        --text-2: #4e5876;
        --text-3: #7b849e;

        --brand-1: #6d5cf0;
        --brand-2: #2f7bff;
        --brand-3: #10b6d6;
        --brand: #5b6cf0;
        --brand-soft: rgba(91, 108, 240, .1);
        --grad-soft: linear-gradient(135deg, rgba(109, 92, 240, .12), rgba(16, 182, 214, .08));
        --shadow-1: 0 1px 2px rgba(16, 24, 50, .06), 0 12px 30px -18px rgba(16, 24, 50, .3);
        --shadow-2: 0 30px 70px -30px rgba(16, 24, 50, .35);
        --glow: 0 0 0 1px rgba(91, 108, 240, .18), 0 18px 44px -22px rgba(91, 108, 240, .4);
        color-scheme: light;
    }
}

/* ------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.85;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

::selection { background: var(--brand); color: #fff; }

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

/* scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--elev); border-radius: 99px; border: 3px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ------------------------------------------------------ Typography */
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.4; font-weight: 700; }
h1, h2, .display { font-family: var(--font-display); font-weight: 400; line-height: 1.28; letter-spacing: .2px; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--brand);
    text-transform: uppercase;
    margin-bottom: .9rem;
}
.eyebrow::before {
    content: '';
    width: 26px; height: 2px;
    background: var(--grad);
    border-radius: 2px;
}

.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ------------------------------------------------------ Layout */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}
.container--narrow { max-width: 820px; }

.sec { padding: clamp(48px, 6.2vw, 86px) 0; position: relative; }
.sec--tight { padding: clamp(40px, 5vw, 64px) 0; }
.sec-head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 52px); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-title { margin-bottom: .35em; }
.sec-sub { color: var(--text-2); font-size: 1.02rem; margin: 0; }

.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

/* ------------------------------------------------------ Buttons */
.btn {
    --btn-bg: var(--surface-2);
    --btn-fg: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .8rem 1.5rem;
    border-radius: var(--radius-pill);
    background: var(--btn-bg);
    color: var(--btn-fg);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, color .25s;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    line-height: 1.6;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .ic { flex: 0 0 auto; }

.btn--primary {
    background: var(--grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 30px -14px rgba(90, 110, 255, .8);
}
.btn--primary:hover { box-shadow: 0 20px 44px -16px rgba(90, 110, 255, .95); }

.btn--outline { background: transparent; border-color: var(--border-2); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--surface-2); }

.btn--sm { padding: .55rem 1rem; font-size: .85rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn--icon { padding: .6rem; border-radius: 14px; }

.btn--danger { background: rgba(248, 113, 113, .12); color: var(--danger); border-color: rgba(248, 113, 113, .3); }

/* ------------------------------------------------------ Badges / chips */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .8rem;
    border-radius: var(--radius-pill);
    background: var(--brand-soft);
    color: var(--brand);
    border: 1px solid rgba(124, 140, 255, .22);
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.7;
}
.badge--muted { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge--ok { background: rgba(52, 211, 153, .12); color: var(--ok); border-color: rgba(52, 211, 153, .28); }
.badge--warn { background: rgba(251, 191, 36, .12); color: var(--warn); border-color: rgba(251, 191, 36, .28); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    padding: .32rem .85rem;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: .8rem;
    color: var(--text-2);
    transition: .25s var(--ease);
}
a.chip:hover, .chip--active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ------------------------------------------------------ Card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    position: relative;
    transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, background .35s;
}
.card--hover:hover {
    transform: translateY(-6px);
    border-color: var(--border-2);
    box-shadow: var(--shadow-2);
}

/* ------------------------------------------------------ Preloader */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--bg);
    transition: opacity .5s ease, visibility .5s ease;
}
#preloader.is-done { opacity: 0; visibility: hidden; }
.pl-grid { display: flex; flex-wrap: wrap; width: 168px; height: 168px; }
.pl-cell {
    flex: 0 0 52px; height: 52px; margin: 2px;
    border-radius: 8px;
    animation: ripple 1.5s ease infinite;
}
.pl-cell.d1 { animation-delay: .1s; }
.pl-cell.d2 { animation-delay: .2s; }
.pl-cell.d3 { animation-delay: .3s; }
.pl-cell.d4 { animation-delay: .4s; }
.pl-cell:nth-child(1) { --cc: var(--brand-1); }
.pl-cell:nth-child(2) { --cc: #7b86ff; }
.pl-cell:nth-child(3) { --cc: var(--brand-2); }
.pl-cell:nth-child(4) { --cc: #3f9dff; }
.pl-cell:nth-child(5) { --cc: #2fb6ff; }
.pl-cell:nth-child(6) { --cc: #1fc6f5; }
.pl-cell:nth-child(7) { --cc: #26d0e6; }
.pl-cell:nth-child(8) { --cc: var(--brand-3); }
.pl-cell:nth-child(9) { --cc: #5ee6e0; }
@keyframes ripple {
    0%, 100% { background: transparent; }
    30% { background: var(--cc); }
    60% { background: transparent; }
}

/* ------------------------------------------------------ Progress + Back-to-top */
.scroll-bar {
    position: fixed; top: 0; right: 0; height: 3px; width: 0;
    background: var(--grad); z-index: 200;
    transition: width .1s linear;
}
.to-top {
    position: fixed; bottom: 26px; left: 26px; z-index: 120;
    width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: var(--shadow-1);
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: .35s var(--ease);
    cursor: pointer;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--brand); color: var(--brand); }

/* ------------------------------------------------------ Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    transition: background .35s, border-color .35s, backdrop-filter .35s;
    border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    border-bottom-color: var(--border);
}
.nav {
    display: flex; align-items: center; gap: 18px;
    height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: .7rem; flex: 0 0 auto; }
.brand-name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.brand-sub { display: block; font-size: .62rem; color: var(--text-3); letter-spacing: .12em; font-weight: 600; }

/* لوگوی ویدیویی (لوپ‌شونده) */
.logo-video {
    position: relative;
    display: inline-block;
    height: var(--logo-h, 42px);
    aspect-ratio: 720 / 135;
    border-radius: 11px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #0a1020;
    box-shadow: 0 10px 26px -16px rgba(80, 120, 255, .95);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.brand:hover .logo-video { transform: translateY(-1px); box-shadow: 0 14px 32px -16px rgba(80, 120, 255, 1); }
.logo-video img,
.logo-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* لوگوی ثابت (پنل مدیریت) */
.logo-image {
    height: var(--logo-h, 34px);
    width: auto;
    border-radius: 9px;
    display: block;
    flex: 0 0 auto;
}

/* اندازه‌های واکنش‌گرا */
@media (max-width: 900px) {
    .site-header .logo-video { --logo-h: 36px !important; }
}
@media (max-width: 640px) {
    .site-header .logo-video { --logo-h: 32px !important; }
    .site-footer .logo-video { --logo-h: 38px !important; }
}
@media (max-width: 400px) {
    .site-header .logo-video { --logo-h: 28px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .logo-video video { display: none; }
}

.nav-menu { display: flex; align-items: center; gap: 2px; margin-inline-start: 14px; }
.nav-link {
    position: relative;
    padding: .55rem .9rem;
    border-radius: 10px;
    font-size: .93rem;
    font-weight: 500;
    color: var(--text-2);
    transition: color .25s, background .25s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after {
    content: ''; position: absolute; inset-inline: .9rem; bottom: .2rem; height: 2px;
    background: var(--grad); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }

.icon-btn {
    width: 42px; height: 42px; border-radius: 13px;
    display: grid; place-items: center;
    background: var(--surface-2); border: 1px solid var(--border);
    cursor: pointer; transition: .25s var(--ease);
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

.burger { display: none; }

/* ------------------------------------------------------ Mobile nav */
.mnav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 22px 20px 40px;
    overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: .35s var(--ease);
}
.mnav.is-open { opacity: 1; visibility: visible; transform: none; }
.mnav-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem .4rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.15rem;
    font-family: var(--font-display);
    color: var(--text-2);
}
.mnav-link.is-active, .mnav-link:hover { color: var(--brand); }
.mnav-foot { margin-top: 26px; display: grid; gap: 12px; }

/* ------------------------------------------------------ Hero */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 100px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob {
    position: absolute; border-radius: 50%;
    filter: blur(90px); opacity: .5;
    animation: float 18s ease-in-out infinite;
}
.blob--1 { width: 520px; height: 520px; top: -160px; right: -80px; background: radial-gradient(circle, #6d5cf0, transparent 70%); }
.blob--2 { width: 460px; height: 460px; top: 40px; left: -120px; background: radial-gradient(circle, #22a8f0, transparent 70%); animation-delay: -6s; }
.blob--3 { width: 380px; height: 380px; bottom: -160px; right: 34%; background: radial-gradient(circle, #22d3ee, transparent 70%); animation-delay: -11s; opacity: .35; }
[data-theme="light"] .blob { opacity: .28; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -28px) scale(1.08); }
    66% { transform: translate(-24px, 22px) scale(.95); }
}
.hero-grid-lines {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 62px 62px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 75%);
    opacity: .5;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }

/* جلوگیری از سرریز محتوای پهن (مثل پنجرهٔ کد) در سلول‌های Grid */
.hero-inner > *,
.about-grid > *,
.contact-band-grid > *,
.grid > * { min-width: 0; }

.hero-badge {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .45rem 1rem .45rem .55rem;
    border-radius: var(--radius-pill);
    background: var(--surface); border: 1px solid var(--border);
    font-size: .84rem; color: var(--text-2);
    box-shadow: var(--shadow-1);
    margin-bottom: 1.4rem;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero-title { font-size: clamp(2.2rem, 6vw, 4rem); margin-bottom: 1rem; }
.rotator { display: inline-block; position: relative; min-width: 6ch; }
.rotator .word {
    display: inline-block;
    background: var(--grad);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}
.rotator .word.enter { animation: wordIn .55s var(--ease) both; }
.rotator .word.leave { animation: wordOut .35s var(--ease) both; }
@keyframes wordIn { from { opacity: 0; filter: blur(12px); transform: translateY(14px); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes wordOut { to { opacity: 0; filter: blur(12px); transform: translateY(-14px); } }

.hero-sub { font-size: clamp(1rem, 1.6vw, 1.14rem); color: var(--text-2); max-width: 56ch; margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2.4rem; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; }
.hero-stat b { font-family: var(--font-display); font-size: 2rem; font-weight: 400; display: block; line-height: 1; }
.hero-stat span { font-size: .82rem; color: var(--text-3); }
.hero-stat > b span, .hero-stat b .num { font-size: inherit; color: inherit; }

/* پنجره کد تزئینی */
.code-win {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-2);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
    transition: transform .6s var(--ease);
}
.code-win:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.code-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.code-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--text-3); opacity: .5; }
.code-bar i:nth-child(1) { background: #ff5f57; opacity: 1; }
.code-bar i:nth-child(2) { background: #febc2e; opacity: 1; }
.code-bar i:nth-child(3) { background: #28c840; opacity: 1; }
.code-bar span { margin-inline-start: auto; font-size: .74rem; color: var(--text-3); font-family: ui-monospace, monospace; direction: ltr; }
.code-body { padding: 20px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; line-height: 2; direction: ltr; text-align: left; overflow-x: auto; }
.code-body .c1 { color: #c792ea; } .code-body .c2 { color: #82aaff; }
.code-body .c3 { color: #7fdbca; } .code-body .c4 { color: #f78c6c; }
.code-body .c5 { color: var(--text-3); } .code-body .c6 { color: #ffcb6b; }

/* ------------------------------------------------------ Marquee */
.marquee { overflow: hidden; padding: 18px 0; border-block: 1px solid var(--border); background: var(--bg-2); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 46px; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: .5rem; color: var(--text-3); font-weight: 600; white-space: nowrap; }
.marquee-item .ic { color: var(--brand); }
@keyframes marquee { to { transform: translateX(50%); } }

/* ------------------------------------------------------ About */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.about-media { position: relative; }
.about-photo {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border); background: var(--surface);
    aspect-ratio: 4/5; box-shadow: var(--shadow-2);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo .ph-fallback { display: grid; place-items: center; height: 100%; color: var(--text-3); background: var(--grad-soft); }
.about-badge {
    position: absolute; bottom: 18px; inset-inline-start: -14px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-2);
    display: flex; align-items: center; gap: .7rem;
}
.about-badge b { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; display: block; }
.about-badge span { font-size: .76rem; color: var(--text-3); }
.about-badge b span { font-size: inherit; color: inherit; }

.points { display: grid; gap: 12px; margin-top: 1.6rem; }
.point { display: flex; gap: .7rem; align-items: flex-start; color: var(--text-2); }
.point .ic { color: var(--brand); flex: 0 0 auto; margin-top: 5px; }

/* ------------------------------------------------------ Skills */
.skill-cat { margin-bottom: 1.6rem; }
.skill-cat h4 { color: var(--brand); font-size: .95rem; margin-bottom: 1rem; }
.skill { margin-bottom: 1rem; }
.skill-top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .5rem; }
.skill-top b { font-weight: 600; }
.skill-top span { color: var(--text-3); font-size: .84rem; }
.skill-bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.skill-fill { height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width 1.2s var(--ease); }

/* ------------------------------------------------------ Services */
.svc { display: flex; flex-direction: column; gap: .9rem; height: 100%; }
.svc-icon {
    width: 54px; height: 54px; border-radius: 16px;
    display: grid; place-items: center;
    background: var(--grad-soft); border: 1px solid var(--border);
    color: var(--brand);
    transition: .35s var(--ease);
}
.card--hover:hover .svc-icon { background: var(--grad); color: #fff; transform: rotate(-6deg) scale(1.05); }
.svc h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.svc p { color: var(--text-2); font-size: .95rem; margin: 0; }
.svc ul { display: grid; gap: .45rem; margin-top: .3rem; }
.svc li { display: flex; gap: .5rem; font-size: .87rem; color: var(--text-2); }
.svc li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); margin-top: 10px; flex: 0 0 auto; }

/* ------------------------------------------------------ Projects */
.proj { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.proj-cover { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--grad-soft); }
.proj-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card--hover:hover .proj-cover img { transform: scale(1.06); }
.proj-cover .ph-fallback { display: grid; place-items: center; height: 100%; color: var(--text-3); }
.proj-cat { position: absolute; top: 14px; inset-inline-start: 14px; }
.proj-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.proj-body h3 { margin: 0; font-size: 1.15rem; }
.proj-body h3 a:hover { color: var(--brand); }
.proj-body p { color: var(--text-2); font-size: .9rem; margin: 0; }
.proj-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .8rem; font-size: .82rem; color: var(--text-3); }
.proj-link { color: var(--brand); display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }

/* ------------------------------------------------------ Posts */
.post { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.post-cover { aspect-ratio: 16/9; overflow: hidden; background: var(--grad-soft); position: relative; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card--hover:hover .post-cover img { transform: scale(1.05); }
.post-cover .ph-fallback { display: grid; place-items: center; height: 100%; color: var(--text-3); background: var(--grad-soft); }
.post-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 1rem; font-size: .8rem; color: var(--text-3); }
.post-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.post-body h3 { margin: 0; font-size: 1.15rem; line-height: 1.55; }
.post-body h3 a:hover { color: var(--brand); }
.post-body p { color: var(--text-2); font-size: .9rem; margin: 0; }
.post-foot { margin-top: auto; padding-top: .9rem; }

/* ------------------------------------------------------ Testimonials */
.testi { display: flex; flex-direction: column; gap: 1rem; height: 100%; }
.testi-stars { display: flex; gap: 2px; color: var(--warn); }
.testi p { color: var(--text-2); font-size: .95rem; margin: 0; line-height: 2; }
.testi-who { display: flex; align-items: center; gap: .7rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.testi-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--grad-soft); display: grid; place-items: center; color: var(--brand); flex: 0 0 auto; }
.testi-avatar img { width: 100%; height: 100%; object-fit: cover; }
.testi-who b { display: block; font-size: .92rem; }
.testi-who span { font-size: .78rem; color: var(--text-3); }

/* ------------------------------------------------------ FAQ */
.faq-list { display: grid; gap: 12px; }
.acc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color .3s; }
.acc.is-open { border-color: var(--border-2); }
.acc-q {
    width: 100%; text-align: start; background: none; border: 0; cursor: pointer;
    padding: 20px 22px; display: flex; align-items: center; gap: 1rem;
    font-weight: 600; font-size: 1.02rem; font-family: var(--font-body);
}
.acc-q:hover { color: var(--brand); }
.acc-q .ic { margin-inline-start: auto; flex: 0 0 auto; transition: transform .35s var(--ease); color: var(--text-3); }
.acc.is-open .acc-q .ic { transform: rotate(180deg); color: var(--brand); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease); }
.acc-a-inner { padding: 0 22px 22px; color: var(--text-2); }

/* ------------------------------------------------------ Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: start; }
.contact-item { display: flex; gap: 1rem; padding: 16px 0; border-bottom: 1px solid var(--border); }
.contact-item .ic { color: var(--brand); flex: 0 0 auto; margin-top: 4px; }
.contact-item b { display: block; font-size: .82rem; color: var(--text-3); margin-bottom: .15rem; }
.contact-item a, .contact-item span { color: var(--text); }
.contact-item a:hover { color: var(--brand); }

.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: .45rem; }
.field label { font-size: .87rem; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--danger); }
.input, .textarea, .select {
    width: 100%;
    padding: .85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: border-color .25s, box-shadow .25s, background .25s;
    font-family: var(--font-body);
}
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.9; }
.hint { font-size: .78rem; color: var(--text-3); }
.hp { position: absolute; left: -9999px; opacity: 0; }

.alert {
    display: flex; align-items: flex-start; gap: .7rem;
    padding: 14px 18px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--surface-2);
    font-size: .9rem; margin-bottom: 18px;
}
.alert--ok { border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .1); color: var(--ok); }
.alert--err { border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .1); color: var(--danger); }
.alert .ic { flex: 0 0 auto; margin-top: 3px; }

.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-top: 28px; }
.map-wrap iframe { width: 100%; height: 340px; border: 0; display: block; filter: grayscale(.2); }

/* ------------------------------------------------------ Page header */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); position: relative; }
.page-hero h1 { margin-bottom: .4rem; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .85rem; color: var(--text-3); margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { opacity: .5; }

/* ------------------------------------------------------ Article / prose */
.article-hero { max-width: 780px; margin: 0 auto; text-align: center; }
.article-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; color: var(--text-3); font-size: .87rem; margin-top: 1rem; }
.article-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.article-cover { margin: 32px 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-2); }
.article-cover img { width: 100%; }

.prose { font-size: 1.06rem; line-height: 2.15; color: var(--text); }
.prose > * + * { margin-top: 1.3em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; }
.prose h2, .prose h3 { position: relative; padding-inline-start: .9rem; }
.prose h2::before, .prose h3::before {
    content: ''; position: absolute; inset-inline-start: 0; top: .2em; bottom: .2em; width: 4px;
    background: var(--grad); border-radius: 4px;
}
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
.prose a:hover { color: var(--brand-3); }
.prose img { border-radius: var(--radius); margin: 1.6em auto; box-shadow: var(--shadow-1); }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose ul li, .prose ol li { margin-bottom: .5em; position: relative; }
.prose ul li::marker { color: var(--brand); }
.prose ol li::marker { color: var(--brand); font-weight: 700; }
.prose blockquote {
    padding: 1.2rem 1.5rem; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    border-inline-start: 4px solid var(--brand);
    color: var(--text-2); font-style: normal;
}
.prose blockquote p:last-child { margin: 0; }
.prose code { background: var(--surface-2); padding: .15em .45em; border-radius: 6px; font-size: .9em; font-family: ui-monospace, monospace; }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; overflow-x: auto; direction: ltr; text-align: left; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: .7rem 1rem; border: 1px solid var(--border); text-align: start; }
.prose th { background: var(--surface-2); font-weight: 700; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose figure figcaption { text-align: center; font-size: .85rem; color: var(--text-3); margin-top: .6rem; }

.article-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--border); }

.share { display: flex; align-items: center; gap: .6rem; margin-top: 1.6rem; flex-wrap: wrap; }
.share b { font-size: .85rem; color: var(--text-3); font-weight: 600; }
.share a {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    background: var(--surface-2); border: 1px solid var(--border); transition: .25s var(--ease);
}
.share a:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

/* ------------------------------------------------------ Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 46px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 42px; height: 42px; padding: 0 14px;
    display: grid; place-items: center;
    border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
    font-size: .9rem; transition: .25s var(--ease);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .is-current { background: var(--grad); color: #fff; border-color: transparent; }

/* ------------------------------------------------------ Resume */
.timeline { position: relative; padding-inline-start: 30px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 2rem; }
.tl-item::before {
    content: ''; position: absolute; inset-inline-start: -30px; top: 7px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--brand);
}
.tl-item::after { content: ''; position: absolute; inset-inline-start: -23px; top: 14px; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); }
.tl-date { font-size: .82rem; color: var(--brand); font-weight: 600; }
.tl-item h4 { margin: .3rem 0 .4rem; font-size: 1.05rem; }
.tl-item p { color: var(--text-2); font-size: .92rem; margin: 0; }

.doc-card { display: flex; align-items: center; gap: 1rem; }
.doc-ic { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--grad-soft); color: var(--brand); flex: 0 0 auto; }

/* ------------------------------------------------------ Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 26px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat b { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 400; display: block; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.stat > span { font-size: .86rem; color: var(--text-3); }
.stat b .num { font-size: inherit; }

/* ------------------------------------------------------ CTA band */
.cta-band {
    position: relative; overflow: hidden;
    border-radius: var(--radius-lg);
    padding: clamp(36px, 5vw, 64px);
    background: var(--surface); border: 1px solid var(--border);
    text-align: center;
}
.cta-band::before { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: .7; }
.cta-band > * { position: relative; }

/* بند ارتباط حرفه‌ای */
.contact-band {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: clamp(26px, 4vw, 54px);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
}
.contact-band::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--grad-soft);
    opacity: .85;
    pointer-events: none;
}
/* لبهٔ گرادیانتی نازک */
.contact-band::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: .4;
    pointer-events: none;
}
.contact-band > * { position: relative; z-index: 1; }
.contact-band-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(26px, 4vw, 48px);
    align-items: center;
}
.contact-band-copy .sec-sub { max-width: 46ch; }
.contact-band-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.9rem; }

.contact-methods { display: grid; gap: 10px; }
.contact-method {
    display: flex; align-items: center; gap: .9rem;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 74%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    transition: transform .28s var(--ease), border-color .28s, box-shadow .28s;
}
a.contact-method:hover { transform: translateX(-5px); border-color: var(--border-2); box-shadow: var(--shadow-1); }
.contact-method-ic {
    width: 42px; height: 42px; flex: 0 0 auto;
    border-radius: 12px; display: grid; place-items: center;
    background: var(--grad-soft); border: 1px solid var(--border);
    color: var(--brand);
}
.contact-method-txt { display: grid; line-height: 1.65; min-width: 0; text-align: start; }
.contact-method-txt b { font-size: .76rem; color: var(--text-3); font-weight: 600; }
.contact-method-txt span { font-size: .93rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
    .contact-band-grid { grid-template-columns: 1fr; gap: 26px; }
    .contact-band-actions { margin-top: 1.4rem; }
    .contact-band-actions .btn { flex: 1 1 auto; }
}

/* ------------------------------------------------------ Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: clamp(40px, 6vw, 80px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding: clamp(44px, 6vw, 70px) 0 40px; }
.footer-brand p { color: var(--text-2); font-size: .92rem; margin-top: 1rem; max-width: 40ch; }
.footer-col h5 { font-size: .95rem; margin-bottom: 1.1rem; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; }
.footer-col ul { display: grid; gap: .6rem; }
.footer-col a { color: var(--text-2); font-size: .9rem; transition: color .2s, padding .2s; display: inline-block; }
.footer-col a:hover { color: var(--brand); padding-inline-start: 4px; }
.footer-contact li { display: flex; gap: .6rem; color: var(--text-2); font-size: .9rem; align-items: flex-start; }
.footer-contact .ic { color: var(--brand); flex: 0 0 auto; margin-top: 5px; }
.footer-social { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.footer-social a {
    width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
    transition: .28s var(--ease);
}
.footer-social a:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-3px); }
.footer-bottom {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
    padding: 22px 0; border-top: 1px solid var(--border); font-size: .86rem; color: var(--text-3);
}
.fb-copy { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .45rem; color: var(--text-2); }
.fb-c .fb-sep, .fb-sep { color: var(--text-3); opacity: .7; }
.fb-copy b, .fb-copy strong { color: var(--text); }
.fb-made { display: inline-flex; align-items: center; gap: .4rem; }
.footer-bottom .heart { color: #ff5a78; display: inline-block; animation: pulse 1.8s infinite; }

/* دکمه‌های دعوت فوتر (تلگرام و ایمیل) */
.footer-cta { display: grid; gap: 10px; margin-top: 1.3rem; max-width: 360px; }
.join-btn {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 13px 15px;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--border);
    transition: transform .28s var(--ease), border-color .28s, box-shadow .28s, background .28s;
    min-width: 0;
}
.join-btn:hover { transform: translateY(-3px); }
.join-ico {
    width: 42px; height: 42px; flex: 0 0 auto;
    border-radius: 12px; display: grid; place-items: center; color: #fff;
}
.join-txt { display: grid; line-height: 1.6; min-width: 0; text-align: start; }
.join-txt b { font-size: .92rem; color: var(--text); font-weight: 600; }
.join-txt small {
    font-size: .74rem; color: var(--text-3);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.join-arrow { margin-inline-start: auto; flex: 0 0 auto; opacity: .65; transition: transform .28s var(--ease), opacity .28s; }
.join-btn:hover .join-arrow { transform: translateX(-4px); opacity: 1; }

.join-btn--tg { background: linear-gradient(135deg, rgba(41, 171, 226, .16), rgba(34, 158, 217, .05)); border-color: rgba(41, 171, 226, .32); }
.join-btn--tg .join-ico { background: #29abe2; }
.join-btn--tg .join-arrow { color: #29abe2; }
.join-btn--tg:hover { border-color: #29abe2; box-shadow: 0 16px 38px -20px rgba(41, 171, 226, .85); }

.join-btn--mail { background: linear-gradient(135deg, rgba(124, 140, 255, .16), rgba(34, 211, 238, .05)); border-color: rgba(124, 140, 255, .32); }
.join-btn--mail .join-ico { background: var(--grad); }
.join-btn--mail .join-arrow { color: var(--brand); }
.join-btn--mail:hover { border-color: var(--brand); box-shadow: 0 16px 38px -20px rgba(124, 140, 255, .85); }

.join-btn--phone { background: linear-gradient(135deg, rgba(52, 211, 153, .16), rgba(16, 185, 129, .05)); border-color: rgba(52, 211, 153, .34); }
.join-btn--phone .join-ico { background: linear-gradient(135deg, #34d399, #10b981); }
.join-btn--phone .join-arrow { color: var(--ok); }
.join-btn--phone:hover { border-color: var(--ok); box-shadow: 0 16px 38px -20px rgba(52, 211, 153, .85); }

/* ------------------------------------------------------ Gallery */
.gal-grid { columns: 4; column-gap: 14px; }
.gal-item {
    break-inside: avoid; margin: 0 0 14px;
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); background: var(--surface-2);
    position: relative;
}
.gal-item img { width: 100%; height: auto; display: block; transition: transform .7s var(--ease); }
.gal-item:hover img { transform: scale(1.04); }
@media (max-width: 1080px) { .gal-grid { columns: 3; } }
@media (max-width: 700px)  { .gal-grid { columns: 2; } }
@media (max-width: 440px)  { .gal-grid { columns: 1; } }

/* هم‌اندازه‌کردن عدد و علامت مثبت در آمار */
.hero-stat b .suf,
.stat b .suf,
.about-badge b .suf {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.02em;
    line-height: 1;
    margin-inline-start: .03em;
    vertical-align: baseline;
    color: inherit;
    -webkit-text-fill-color: inherit;
}

/* ------------------------------------------------------ Group divider */
.group-sep {
    display: flex; align-items: center; gap: 16px;
    margin: 10px 0 12px;
}
.group-sep-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border-2), transparent); }
.group-sep-title {
    display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--font-display); font-size: 1.45rem; color: var(--text);
    padding: .35rem 1.1rem; border-radius: var(--radius-pill);
    background: var(--surface); border: 1px solid var(--border);
    white-space: nowrap;
}
.group-sep-title .ic { color: var(--brand); }
.group-sep-sub {
    text-align: center; color: var(--text-3); font-size: .92rem;
    margin: 0 0 30px;
}
@media (max-width: 560px) {
    .group-sep-title { font-size: 1.15rem; padding: .3rem .8rem; }
    .group-sep { gap: 10px; }
}

/* ------------------------------------------------------ Empty state */
.empty { text-align: center; padding: 70px 20px; color: var(--text-3); }
.empty .ic { margin: 0 auto 1rem; opacity: .5; width: 44px; height: 44px; }

/* ------------------------------------------------------ Reveal */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }
.js .reveal[data-delay="4"] { transition-delay: .32s; }
.js .reveal[data-delay="5"] { transition-delay: .4s; }

/* ------------------------------------------------------ Toast */
.toast-wrap { position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 300; display: grid; gap: 10px; }
.toast {
    display: flex; align-items: center; gap: .6rem;
    padding: 14px 18px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: var(--shadow-2); font-size: .9rem;
    animation: toastIn .4s var(--ease);
}
.toast--ok .ic { color: var(--ok); }
.toast--err .ic { color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }

/* ------------------------------------------------------ Responsive */
@media (max-width: 1080px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .code-win { transform: none; }
    .about-grid { grid-template-columns: 1fr; gap: 36px; }
    .about-photo { max-width: 420px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 900px) {
    .nav-menu, .nav-actions .btn { display: none; }
    .burger { display: grid; }
    .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    :root { --header-h: 66px; }
    body { font-size: 15.5px; }
    .g-2, .g-3, .g-4, .g-auto { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero-stats { gap: 18px; }
    .hero-stat b { font-size: 1.6rem; }
    .brand-name { font-size: 1.3rem; }
    .card { padding: 20px; }
    .to-top { bottom: 16px; inset-inline-start: 16px; }
    .toast-wrap { inset-inline: 16px; }
    .about-badge { inset-inline-start: 10px; }

    /* پنجرهٔ کد روی گوشی: وسط‌چین و بدون سرریز */
    .hero-visual { margin-inline: auto; width: 100%; }
    .code-win { transform: none; margin-inline: auto; }
    .code-bar { padding: 10px 14px; }
    .code-bar span { font-size: .68rem; }
    .code-body { padding: 16px 14px; font-size: .72rem; line-height: 1.95; }
}

@media (max-width: 420px) {
    .code-body { font-size: .66rem; padding: 14px 12px; }
    .code-bar span { font-size: .62rem; }
}

/* ------------------------------------------------------ Motion / print */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .js .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

@media print {
    .site-header, .site-footer, .to-top, .scroll-bar, #preloader, .share, .mnav { display: none !important; }
    body { background: #fff; color: #000; }
    .prose { font-size: 12pt; }
}

/* متن فقط برای اسکرین‌ریدر / موتور جستجو */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
