/* ============================================================
   style.css - Premium Dark + Light (Blue/Green) Theme v3
   - Fixed: AOS disappearing bug (overflow-x: clip)
   - Added: Custom Cursor Styles
   - Enhanced: 3D Perspective for Tilt Animations
   - Added: Epic Quantum Loader & FAQ Section
   - Fixed: Bulletproof Header Grid & Mobile Nav Overlap
   - NEW: Ultimate Mobile Responsive & Z-Index Fix
   ============================================================ */

/* ============================================================
   [1] VARIABLES & THEMES
   ============================================================ */
:root {
    --bg-deep: #04040a;
    --bg-surface: #0b0b14;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-main: #ffffff;
    --text-muted: #8b8ba7;
    --accent-primary: #00f2fe;
    --accent-secondary: #4facfe;
    --accent-tertiary: #b621fe;
    --accent-rgb: 0, 242, 254;
    --accent2-rgb: 79, 172, 254;
    --accent3-rgb: 182, 33, 254;
    --accent-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #b621fe 100%);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(12, 12, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.07);
    --easing: cubic-bezier(0.16, 1, 0.3, 1);
    --max-width: 1280px;
    --header-height: 80px;
    --radius-card: 24px;
    --radius-pill: 100px;
    --shadow-glow: 0 10px 40px rgba(var(--accent-rgb), 0.15);
}

[data-theme="light"] {
    --bg-deep: #f0f7fa;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.6);
    --text-main: #0c3547;
    --text-muted: #4a6b7c;
    --accent-primary: #0ea5e9;
    --accent-secondary: #06b6d4;
    --accent-tertiary: #10b981;
    --accent-rgb: 14, 165, 233;
    --accent2-rgb: 6, 182, 212;
    --accent3-rgb: 16, 185, 129;
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #10b981 100%);
    --border-subtle: rgba(12, 53, 71, 0.10);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(14, 165, 233, 0.14);
    --shadow-glow: 0 15px 50px rgba(14, 165, 233, 0.18);
}

/* ============================================================
   [2] RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
    scroll-padding-top: 95px;
}

body {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.8;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    transition: background-color .5s ease, color .5s ease;
    position: relative;
    min-height: 100vh;
}

@media (min-width: 1025px) {
    .nav-menu > li { pointer-events: auto; }
}

::selection {
    background: rgba(var(--accent-rgb), .35);
    color: #fff;
}

address { font-style: normal; }

[data-theme="light"] body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 8% 15%, rgba(14, 165, 233, 0.10), transparent 45%),
        radial-gradient(circle at 92% 25%, rgba(16, 185, 129, 0.09), transparent 45%),
        radial-gradient(circle at 50% 95%, rgba(6, 182, 212, 0.10), transparent 50%);
    z-index: -2;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color .3s ease;
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   [3] BACKGROUND ORBS & AMBIENT
   ============================================================ */
.ambient-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(var(--accent3-rgb), .15), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(var(--accent-rgb), .10), transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(var(--accent2-rgb), .10), transparent 50%);
    z-index: -1;
    filter: blur(80px);
    animation: pulse-bg 15s ease-in-out infinite alternate;
}

[data-theme="light"] .ambient-bg { opacity: .5; }

@keyframes pulse-bg {
    0%   { transform: scale(1) rotate(0); opacity: .6; }
    100% { transform: scale(1.2) rotate(10deg); opacity: .9; }
}

.orb {
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
    pointer-events: none;
    animation: orb-float 22s ease-in-out infinite alternate;
}

.orb-1 { width: 340px; height: 340px; background: rgba(var(--accent-rgb), .16); top: 12%; inset-inline-start: -120px; }
.orb-2 { width: 280px; height: 280px; background: rgba(var(--accent3-rgb), .14); bottom: 18%; inset-inline-end: -100px; animation-delay: 4s; }
.orb-3 { width: 220px; height: 220px; background: rgba(var(--accent2-rgb), .14); top: 55%; inset-inline-start: 30%; animation-delay: 8s; }

@keyframes orb-float {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(60px, -40px) scale(1.15); }
}

/* ============================================================
   [4] SCROLL PROGRESS
   ============================================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    height: 3px;
    width: 0%;
    background: var(--accent-gradient);
    z-index: 3000;
    box-shadow: 0 0 12px rgba(var(--accent-rgb), .7);
}

/* ============================================================
   [5] EPIC QUANTUM LOADER
   ============================================================ */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background: #04040a;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2.5rem;
    transition: opacity .8s var(--easing), visibility .8s;
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.quantum-loader {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.quantum-core {
    width: 25px;
    height: 25px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 25px var(--accent-primary), 0 0 50px var(--accent-primary);
    animation: pulse-core 1.2s ease-in-out infinite;
    z-index: 3;
}

.quantum-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
}

.quantum-ring-1 {
    background: conic-gradient(from 0deg, transparent 0%, var(--accent-primary) 40%, transparent 60%);
    mask: radial-gradient(farthest-side, transparent calc(100% - 6px), black calc(100% - 6px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), black calc(100% - 6px));
    animation: spin 1.5s linear infinite;
    filter: drop-shadow(0 0 8px var(--accent-primary));
}

.quantum-ring-2 {
    width: 80%;
    height: 80%;
    background: conic-gradient(from 180deg, transparent 0%, var(--accent-tertiary) 40%, transparent 60%);
    mask: radial-gradient(farthest-side, transparent calc(100% - 4px), black calc(100% - 4px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), black calc(100% - 4px));
    animation: spin-reverse 1.8s linear infinite;
    filter: drop-shadow(0 0 8px var(--accent-tertiary));
}

.quantum-ring-3 {
    width: 55%;
    height: 55%;
    border: 2px dashed rgba(var(--accent2-rgb), 0.8);
    animation: spin 3s linear infinite reverse;
    box-shadow: 0 0 15px rgba(var(--accent2-rgb), 0.4), inset 0 0 15px rgba(var(--accent2-rgb), 0.4);
}

@keyframes pulse-core {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.5); opacity: 0.7; }
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    0%   { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

.loader-text {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: fade-pulse 1.5s ease-in-out infinite;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loader-progress::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    border-radius: 10px;
    transform: translateX(-100%);
    animation: load-progress 1.5s ease-in-out infinite;
    box-shadow: 0 0 15px var(--accent-primary);
}

@keyframes load-progress {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

@keyframes fade-pulse {
    0%, 100% { opacity: .4; }
    50%      { opacity: 1; }
}

/* ============================================================
   [6] LAYOUT & CONTAINERS
   ============================================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 6rem 2rem;
    width: 100%;
}

.section-header { margin-bottom: 4rem; text-align: center; }

.section-title {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: .8rem;
    background: linear-gradient(135deg, var(--text-main), var(--accent-primary), var(--text-main));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-gradient 5s linear infinite;
}

@keyframes text-gradient {
    to { background-position: 200% center; }
}

.section-divider {
    width: 80px;
    height: 5px;
    background: var(--accent-gradient);
    margin: 0 auto;
    border-radius: var(--radius-pill);
    animation: divider-glow 3s ease-in-out infinite;
}

@keyframes divider-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(var(--accent-rgb), .5); }
    50%      { box-shadow: 0 0 25px rgba(var(--accent-rgb), .9); }
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   [7] GLASS CARD
   ============================================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: var(--radius-card);
    height: 100%;
    transition: all .4s var(--easing);
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--accent-rgb), .35);
    box-shadow: var(--shadow-glow);
}

.glass-card h3 {
    margin-bottom: 1.2rem;
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .7rem;
}

.glass-card h3 i { animation: icon-bounce 3s ease-in-out infinite; }

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

[data-theme="light"] .glass-card,
[data-theme="light"] .project-card,
[data-theme="light"] .contact-item,
[data-theme="light"] .skill-logo-card,
[data-theme="light"] .quality-box,
[data-theme="light"] .contact-cta-box,
[data-theme="light"] .tech-pill,
[data-theme="light"] .tech-badge,
[data-theme="light"] .footer-social a,
[data-theme="light"] .stat-card,
[data-theme="light"] .info-row,
[data-theme="light"] .faq-item {
    background: #ffffff;
    border-color: rgba(14, 165, 233, 0.14);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.10);
}

/* ============================================================
   [8] BUTTONS
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    padding: 1.1rem 2.8rem;
    background: var(--accent-gradient);
    background-size: 200% 200%;
    color: #fff;
    font-weight: 700;
    border-radius: 16px;
    transition: all .4s var(--easing);
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.05rem;
    box-shadow: 0 8px 25px rgba(var(--accent-rgb), .3);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: gradient-shift 5s ease infinite;
    will-change: transform;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.btn-primary:hover {
    box-shadow: 0 15px 35px rgba(var(--accent-rgb), .45);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    padding: 1.1rem 2.8rem;
    background: transparent;
    color: var(--text-main);
    font-weight: 700;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all .4s var(--easing);
    backdrop-filter: blur(10px);
    will-change: transform;
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 600;
    transition: all .3s ease;
}

.btn-back:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* ============================================================
   [9] SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent-gradient); border-radius: 10px; }

/* ============================================================
   [10] GITHUB LOGO
   ============================================================ */
.gh-img {
    background: #ffffff;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 0 0 2px rgba(255,255,255,.25), 0 4px 15px rgba(0,0,0,.25);
}

/* ============================================================
   [11] HEADER & NAVIGATION (BULLETPROOF FLEXBOX NAV)
   ============================================================ */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: all .4s var(--easing);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(4, 4, 10, .85);
    backdrop-filter: blur(25px) saturate(1.5);
    border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] header.scrolled {
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 30px rgba(14, 165, 233, .08);
}

header nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2.5rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 1.5rem;
}

.brand {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    letter-spacing: 1px;
    z-index: 1002;
    display: flex;
    align-items: center;
    direction: ltr;
    unicode-bidi: plaintext;
    white-space: nowrap;
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), .25));
    flex-shrink: 0;
}

.brand .first { color: var(--text-main); }
.brand .last { color: var(--accent-primary); }
.brand .dot { color: var(--accent-tertiary); font-size: 1.8rem; line-height: 1; margin: 0 -2px; }
.brand .dev { color: var(--accent-primary); font-weight: 900; font-size: .9rem; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: .8rem;
    flex: 1;
    justify-content: center;
    flex-wrap: nowrap;
    z-index: 1001;
    visibility: visible;
    opacity: 1;
    transition: transform .5s var(--easing), opacity .3s, visibility .3s;
}

.nav-menu > li { pointer-events: auto; }
.nav-menu-header { display: none; }

.nav-link {
    font-size: .98rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: .6rem 1.4rem;
    border-radius: 14px;
    transition: all .3s var(--easing);
    display: flex;
    align-items: center;
    gap: .6rem;
    white-space: nowrap;
}

.nav-link:hover {
    color: #fff;
    background: rgba(var(--accent-rgb), .12);
}

[data-theme="light"] .nav-link:hover { color: var(--accent-primary); }

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(var(--accent-rgb), .1);
}

.nav-link-special {
    background: var(--accent-gradient) !important;
    background-size: 200% 200%;
    color: #fff !important;
    box-shadow: 0 5px 20px rgba(var(--accent-rgb), .35);
    animation: gradient-shift 5s ease infinite;
    will-change: transform;
}

.nav-controls { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    z-index: 1002; 
    flex-shrink: 0;
}

.theme-toggle, .lang-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: .6rem .8rem;
    border-radius: 12px;
    transition: all .3s var(--easing);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .theme-toggle, [data-theme="light"] .lang-toggle { background: #fff; }

.theme-toggle:hover, .lang-toggle:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px) rotate(15deg);
}

.lang-menu { position: relative; display: inline-block; }

.lang-menu-content {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: .6rem;
    min-width: 130px;
    box-shadow: 0 25px 60px rgba(0,0,0,.4);
    backdrop-filter: blur(25px);
}

html[dir="ltr"] .lang-menu-content { left: auto; right: 0; }

.lang-menu-content.active { display: block; animation: fadeInDown .25s var(--easing); }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lang-menu-content button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: .6rem 1rem;
    width: 100%;
    text-align: inherit;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    border-radius: 10px;
    transition: all .2s;
    font-size: .95rem;
}

.lang-menu-content button:hover { background: rgba(var(--accent-rgb), .1); color: var(--accent-primary); }

.lang-menu-content button.active-lang {
    color: var(--accent-primary);
    background: rgba(var(--accent-rgb), .12);
    font-weight: 600;
}

.mobile-toggle {
    display: none;
    font-size: 1.6rem;
    color: var(--text-main);
    cursor: pointer;
    background: var(--glass-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: .5rem .8rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 999; /* Lower than header and nav-menu to prevent blocking clicks */
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .45s ease;
}

.menu-overlay.active { display: block; animation: fadeInOverlay .45s ease forwards; }

@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   [12] HERO SECTION
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + 3rem) 2rem 5rem;
    position: relative;
    perspective: 1000px;
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--accent-rgb), .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb), .04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    pointer-events: none;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 50px, 50px 0; }
}

.hero-floats span {
    position: absolute;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    color: rgba(var(--accent-rgb), .22);
    font-size: 1.5rem;
    animation: glyph-float 8s ease-in-out infinite;
    text-shadow: 0 0 25px rgba(var(--accent-rgb), .6);
    user-select: none;
    pointer-events: none;
}

@keyframes glyph-float {
    0%, 100% { transform: translateY(0) rotate(-5deg); opacity: .6; }
    50%      { transform: translateY(-28px) rotate(7deg); opacity: 1; }
}

.hero-content { max-width: 950px; z-index: 2; width: 100%; }

.avatar-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto 3rem;
    transition: transform .2s ease-out;
    will-change: transform;
    transform-style: preserve-3d;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,.12);
    position: relative;
    z-index: 2;
    transition: transform .6s var(--easing);
    background: var(--bg-surface);
}

.avatar-ring {
    position: absolute;
    inset: -20px;
    border: 2px dashed rgba(var(--accent-rgb), .35);
    border-radius: 50%;
    z-index: 1;
    animation: spin-glow 20s linear infinite;
}

.avatar-glow {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    background: var(--accent-gradient);
    filter: blur(40px);
    z-index: 1;
    opacity: .6;
    animation: spin-glow 12s linear infinite reverse;
}

@keyframes spin-glow { 100% { transform: rotate(360deg); } }

.hero:hover .avatar { transform: scale(1.05); }

.status-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--accent-rgb), .4);
    padding: .5rem 1.2rem;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--accent-primary);
    z-index: 3;
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .5; transform: scale(1.3); }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1.4rem;
    background: rgba(var(--accent-rgb), .08);
    border: 1px solid rgba(var(--accent-rgb), .3);
    border-radius: var(--radius-pill);
    color: var(--accent-primary);
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-tag i { animation: icon-bounce 2s ease-in-out infinite; }

.hero-title {
    font-size: clamp(2.6rem, 7vw, 4.6rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.25;
    background: var(--accent-gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(var(--accent-rgb), .3));
    animation: gradient-shift 6s ease infinite;
    min-height: 1.3em;
}

[data-theme="light"] .hero-title { filter: none; }

.type-cursor {
    display: inline-block;
    width: 4px;
    height: .9em;
    background: var(--accent-primary);
    margin-inline-start: 6px;
    vertical-align: -.08em;
    border-radius: 2px;
    box-shadow: 0 0 14px rgba(var(--accent-rgb), .9);
    animation: blink 1s steps(2, jump-none) infinite;
}

.type-cursor-small { width: 3px; height: 1em; }

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 500;
    line-height: 1.8;
    min-height: 2em;
}

.tech-stack {
    display: flex;
    justify-content: center;
    gap: .8rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tech-pill {
    padding: .6rem 1.4rem;
    border-radius: var(--radius-pill);
    font-size: .9rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: 'Roboto Mono', monospace;
    transition: all .3s var(--easing);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    backdrop-filter: blur(10px);
}

.tech-pill img { width: 22px; height: 22px; object-fit: contain; }

.tech-pill:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(var(--accent-rgb), .1);
    transform: translateY(-4px) rotate(-2deg);
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   [13] STATS
   ============================================================ */
.stats-section { padding-top: 0; padding-bottom: 2rem; }

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 2.2rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    transition: all .4s var(--easing);
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), .12), transparent 60%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--accent-rgb), .4);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), .1);
    color: var(--accent-primary);
    font-size: 1.6rem;
    border-radius: 18px;
    animation: icon-bounce 3s ease-in-out infinite;
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.3rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    direction: ltr;
}

.stat-label { color: var(--text-muted); font-weight: 600; margin-top: .3rem; }

/* ============================================================
   [14] SKILLS MARQUEE
   ============================================================ */
.marquee-wrapper {
    position: relative;
    height: 520px;
    margin: 4rem 0;
    overflow: hidden;
    border-radius: var(--radius-card);
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

.marquee-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; height: 100%; }
.marquee-column { display: flex; flex-direction: column; height: max-content; will-change: transform; gap: 1.5rem; }
.marquee-content { display: flex; flex-direction: column; gap: 1.5rem; }

.marquee-up        { animation: marquee-up 26s linear infinite; }
.marquee-down      { animation: marquee-down 30s linear infinite; }
.marquee-up-slow   { animation: marquee-up 40s linear infinite; }
.marquee-down-slow { animation: marquee-down 34s linear infinite; }

@keyframes marquee-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes marquee-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }

.skill-logo-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.3rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color .3s, box-shadow .3s;
}

.skill-logo-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 15px 40px rgba(var(--accent-rgb), .2);
}

.skill-logo-card img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 5px 15px rgba(var(--accent-rgb), .35)); flex-shrink: 0; }
.skill-logo-card span { font-size: 1.05rem; font-weight: 700; color: var(--text-main); font-family: 'Inter', 'Vazirmatn', sans-serif; }

/* ===== RESPONSIVE MARQUEE COLUMNS ===== */

/* تبلت بزرگ: 4 ستون (ستون 5 مخفی می‌شود) */
@media (max-width: 1200px) {
    .marquee-track { grid-template-columns: repeat(4, 1fr) !important; }
    .marquee-column:nth-child(5) { display: none !important; }
}

/* تبلت کوچک: 3 ستون (ستون 4 و 5 مخفی می‌شود) */
@media (max-width: 900px) {
    .marquee-track { grid-template-columns: repeat(3, 1fr) !important; }
    .marquee-column:nth-child(4), .marquee-column:nth-child(5) { display: none !important; }
}

/* موبایل: 2 ستون (ستون 3 و 4 و 5 مخفی می‌شود) */
@media (max-width: 768px) {
    .marquee-track { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; }
    .marquee-column:nth-child(3), .marquee-column:nth-child(4), .marquee-column:nth-child(5) { display: none !important; }
    
    .marquee-wrapper { 
        height: 450px !important;
        padding: 1rem !important; 
        margin: 2rem 0 !important;
    }
    .marquee-column { gap: 1rem !important; }
    .marquee-content { gap: 1rem !important; }
    .skill-logo-card { padding: 1rem !important; gap: 0.6rem !important; width: 100%; }
    .skill-logo-card img { width: 32px !important; height: 32px !important; }
    .skill-logo-card span { font-size: 0.9rem !important; }
}

/* ============================================================
   [15] ABOUT GRID & SKILL BARS
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 3rem; align-items: stretch; }

.about-text p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 1.02rem; line-height: 2; }

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 1rem;
    flex-wrap: wrap;
    gap: .5rem;
}

.info-list li:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); display: flex; align-items: center; gap: .5rem; }
.info-label i { color: var(--accent-primary); }
.info-value { font-weight: 700; color: var(--text-main); font-family: 'Roboto Mono', monospace; text-align: end; direction: ltr; }

.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; margin-top: 1.5rem; }
.skill-bar-wrapper { margin-bottom: .8rem; width: 100%; }
.skill-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; font-size: .92rem; font-weight: 600; font-family: 'Roboto Mono', monospace; }
.skill-meta span { display: flex; align-items: center; gap: .5rem; }
.skill-logo { width: 24px; height: 24px; object-fit: contain; }

.progress-bg {
    height: 10px;
    background: rgba(255,255,255,.06);
    border-radius: var(--radius-pill);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

[data-theme="light"] .progress-bg { background: rgba(12, 53, 71, .06); }

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-pill);
    width: 0;
    transition: width 1.8s var(--easing);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), .5);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ============================================================
   [16] PROJECT CARDS
   ============================================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.2rem;
    perspective: 1400px;
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all .5s var(--easing);
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-card);
    padding: 1px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), .6), transparent 40%, transparent 60%, rgba(var(--accent3-rgb), .6));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
    z-index: 1;
}

.project-card:hover {
    border-color: transparent;
    box-shadow: 0 25px 60px rgba(0,0,0,.35);
}

[data-theme="light"] .project-card:hover { box-shadow: 0 25px 60px rgba(14,165,233,.18); }
.project-card:hover::before { opacity: 1; }

.card-header {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #14141f, #0a0a10);
    transform: translateZ(20px);
}

[data-theme="light"] .card-header { background: linear-gradient(145deg, #e0f2fe, #d1fae5); }

.card-header .card-icon { font-size: 5.5rem; color: rgba(255,255,255,.08); transition: all .5s ease; z-index: 1; position: absolute; }
[data-theme="light"] .card-header .card-icon { color: rgba(12,53,71,.1); }

.card-header .card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--easing); z-index: 2; }

.card-header .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(4,4,10,.4) 50%, rgba(4,4,10,.9) 100%);
    z-index: 3;
}

[data-theme="light"] .card-header .card-overlay { background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,.4) 50%, rgba(255,255,255,.9) 100%); }

.card-shine {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%);
    transform: translateX(-120%);
    transition: transform .8s ease;
    pointer-events: none;
}

.project-card:hover .card-shine { transform: translateX(120%); }
.project-card:hover .card-header .card-img { transform: scale(1.1); }
.project-card:hover .card-header .card-icon { transform: scale(1.25) rotate(8deg); }

.card-body { padding: 2rem; flex-grow: 1; display: flex; flex-direction: column; position: relative; z-index: 4; transform: translateZ(40px); }

.project-title { font-size: 1.25rem; margin-bottom: .8rem; color: var(--text-main); font-weight: 700; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.project-title .title-icon { color: var(--accent-primary); animation: icon-bounce 3s ease-in-out infinite; }
.project-title .badge { background: var(--accent-gradient); color: #fff; font-size: .65rem; padding: .25rem .8rem; border-radius: var(--radius-pill); font-family: 'Roboto Mono', monospace; font-weight: 700; }

.project-desc { font-size: .98rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.9; flex-grow: 1; }

.tags { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.tag {
    font-size: .75rem;
    padding: .35rem .9rem;
    background: rgba(var(--accent-rgb), .07);
    border: 1px solid rgba(var(--accent-rgb), .2);
    border-radius: 8px;
    color: var(--accent-primary);
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: all .3s ease;
}

.tag:hover { transform: translateY(-3px); background: rgba(var(--accent-rgb), .15); }

.card-links { display: flex; gap: 1.2rem; border-top: 1px solid var(--border-subtle); padding-top: 1.4rem; flex-wrap: wrap; }

.card-link { font-size: .9rem; color: var(--text-muted); font-weight: 600; display: flex; align-items: center; gap: .5rem; transition: all .3s; }
.card-link:hover { color: var(--accent-primary); transform: translateX(-4px); }
.card-link:hover i { transform: scale(1.25) rotate(-8deg); }
html[dir="ltr"] .card-link:hover { transform: translateX(4px); }

.quality-box {
    margin-top: 5rem;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 3.5rem 2.5rem;
    border-radius: var(--radius-card);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.quality-box::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(var(--accent-rgb), .1), transparent 70%); pointer-events: none; }

.quality-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 10px 35px rgba(var(--accent-rgb), .45);
    animation: icon-bounce 3s ease-in-out infinite;
    position: relative;
}

.quality-box h3 { color: var(--accent-primary); margin-bottom: 1.2rem; font-size: 1.8rem; font-weight: 800; position: relative; }
.quality-box p { color: var(--text-muted); font-size: 1.1rem; max-width: 850px; margin: 0 auto; line-height: 2; position: relative; }

/* ============================================================
   [17] FAQ SECTION
   ============================================================ */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--easing);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.8), 0 0 30px rgba(var(--accent-rgb), 0.4);
}

.faq-item.active::before, .faq-item:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.faq-item.active {
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.1);
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    color: var(--text-main);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: right;
    transition: color 0.3s ease;
}

[data-theme="light"] .faq-question { color: #0c3547; }
.faq-question:hover { color: var(--accent-primary); }

.faq-question .faq-text {
    flex-grow: 1;
}

.faq-q-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 12px;
    color: var(--accent-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.4s var(--easing);
}

.faq-item.active .faq-q-icon, .faq-question:hover .faq-q-icon {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.05);
}

.faq-toggle-icon {
    min-width: 32px;
    height: 32px;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    transition: all 0.4s var(--easing);
    flex-shrink: 0;
}

.faq-item.active .faq-toggle-icon {
    background: var(--accent-gradient);
    color: #fff;
    transform: rotate(180deg);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.5);
}

.faq-answer-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--easing);
}

.faq-answer {
    padding: 0 2rem 1.8rem 2rem;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 2;
    border-top: 1px solid var(--border-subtle);
    margin-top: -1px;
    padding-top: 1.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

.faq-item.active .faq-answer {
    opacity: 1;
    transform: translateY(0);
}

.faq-answer strong {
    color: var(--accent-primary);
    font-weight: 700;
}

/* ============================================================
   [18] CONTACT GRID
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }

.contact-item {
    text-align: center;
    padding: 2.2rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    transition: all .4s var(--easing);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.contact-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent-gradient); transform: scaleX(0); transition: transform .4s ease; }
.contact-item:hover { border-color: rgba(var(--accent-rgb), .4); transform: translateY(-8px); box-shadow: var(--shadow-glow); }
.contact-item:hover::before { transform: scaleX(1); }

.contact-icon { margin-bottom: .9rem; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; background: rgba(var(--accent-rgb), .08); border-radius: 50%; padding: 1rem; }
.contact-icon img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 5px 15px rgba(var(--accent-rgb), .4)); transition: all .4s ease; }
.contact-item:hover .contact-icon img { transform: scale(1.15) rotate(6deg); }

.contact-item h3 { font-size: 1.05rem; margin-bottom: .4rem; font-weight: 700; }
.contact-item p { font-size: .85rem; color: var(--text-muted); direction: ltr; font-family: 'Roboto Mono', monospace; }

.contact-cta-box {
    margin-top: 3rem;
    padding: 3rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    text-align: center;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.contact-cta-box::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 50%, rgba(var(--accent-rgb), .15), transparent 60%); pointer-events: none; }
.contact-cta-box h3 { font-size: 2rem; font-weight: 800; color: var(--text-main); margin-bottom: 1rem; position: relative; }
.contact-cta-box p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; max-width: 700px; margin-left: auto; margin-right: auto; position: relative; }

/* ============================================================
   [19] FOOTER
   ============================================================ */
.site-footer { position: relative; margin-top: 6rem; padding: 0 2.5rem 2.5rem; background: var(--bg-surface); overflow: visible; }

.footer-wave { position: absolute; bottom: 100%; left: 0; width: 100%; line-height: 0; }
.footer-wave svg { display: block; width: 100%; height: 100px; }
.wave-back { fill: rgba(var(--accent-rgb), .12); }
.wave-front { fill: var(--bg-surface); }

.footer-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 300px;
    background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), .14), transparent 70%);
    pointer-events: none;
    animation: float-glow 7s ease-in-out infinite;
}

@keyframes float-glow { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-25px); } }

.footer-stars { position: absolute; top: 0; left: 0; right: 0; height: 260px; pointer-events: none; }
.footer-stars span { position: absolute; width: 2px; height: 2px; background: var(--accent-primary); border-radius: 50%; box-shadow: 0 0 10px var(--accent-primary); animation: twinkle 3s ease-in-out infinite; }
.footer-stars span:nth-child(1) { top: 12%; left: 8%; }
.footer-stars span:nth-child(2) { top: 22%; left: 26%; animation-delay: .5s; }
.footer-stars span:nth-child(3) { top: 10%; left: 46%; animation-delay: 1s; }
.footer-stars span:nth-child(4) { top: 28%; left: 66%; animation-delay: 1.5s; }
.footer-stars span:nth-child(5) { top: 15%; left: 84%; animation-delay: 2s; }
.footer-stars span:nth-child(6) { top: 40%; left: 14%; animation-delay: .3s; }
.footer-stars span:nth-child(7) { top: 36%; left: 56%; animation-delay: .8s; }
.footer-stars span:nth-child(8) { top: 46%; left: 38%; animation-delay: 1.2s; }
.footer-stars span:nth-child(9) { top: 50%; left: 76%; animation-delay: 1.7s; }
.footer-stars span:nth-child(10){ top: 44%; left: 92%; animation-delay: 2.2s; }

@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.6); } }

.footer-container { max-width: var(--max-width); margin: 0 auto; position: relative; z-index: 2; padding-top: 5rem; }
.footer-cta { margin-bottom: 4.5rem; }

.footer-cta-inner {
    text-align: center;
    padding: 3.5rem 2rem;
    border-radius: var(--radius-card);
    border: 1px solid transparent;
    background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box, var(--accent-gradient) border-box;
    position: relative;
    overflow: hidden;
}

.footer-cta-inner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), .12), transparent 60%); pointer-events: none; }

.footer-cta-icon { width: 70px; height: 70px; margin: 0 auto 1.2rem; display: flex; align-items: center; justify-content: center; background: var(--accent-gradient); color: #fff; font-size: 1.7rem; border-radius: 22px; box-shadow: 0 10px 35px rgba(var(--accent-rgb), .45); animation: icon-bounce 3s ease-in-out infinite; position: relative; }
.footer-cta-inner h3 { font-size: 1.9rem; font-weight: 800; margin-bottom: .6rem; position: relative; }
.footer-cta-inner p { color: var(--text-muted); margin-bottom: 1.8rem; position: relative; }

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 3rem; margin-bottom: 4rem; align-items: start; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; height: auto; }
nav.footer-col, address.footer-col, div.footer-col { max-width: none; margin: 0; padding: 0; height: auto; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; }

.footer-brand .footer-logo { font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 1.7rem; letter-spacing: 1px; margin-bottom: 1.2rem; display: inline-flex; align-items: center; direction: ltr; unicode-bidi: plaintext; filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), .35)); }
.footer-brand .footer-logo .first { color: var(--text-main); }
.footer-brand .footer-logo .last { color: var(--accent-primary); }
.footer-brand .footer-logo .dot { color: var(--accent-tertiary); font-size: 1.9rem; line-height: 1; margin: 0 -2px; }
.footer-brand .footer-logo .dev { color: var(--accent-primary); font-weight: 900; font-size: .95rem; }

.footer-desc { color: var(--text-muted); font-size: .98rem; line-height: 1.9; margin-bottom: 1.6rem; }
.footer-tech-badges { display: flex; gap: .8rem; flex-wrap: wrap; }

.tech-badge { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; padding: .5rem; transition: all .4s var(--easing); }
.tech-badge img { width: 30px; height: 30px; object-fit: contain; }
.tech-badge:hover { transform: translateY(-6px) rotate(6deg); border-color: var(--accent-primary); box-shadow: 0 10px 25px rgba(var(--accent-rgb), .3); }

.footer-social-title { margin-top: 2rem; }
.footer-social { display: flex; gap: .9rem; flex-wrap: wrap; }
.footer-social a { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 16px; padding: .6rem; transition: all .4s var(--easing); }
.footer-social a img { width: 28px; height: 28px; object-fit: contain; transition: all .4s ease; }
.footer-social a:hover { transform: translateY(-6px) rotate(8deg); border-color: var(--accent-primary); box-shadow: 0 15px 35px rgba(var(--accent-rgb), .35); }

.footer-col h4 { font-size: 1.12rem; margin-bottom: 1.2rem; color: var(--text-main); font-weight: 700; position: relative; padding-bottom: .8rem; display: flex; align-items: center; gap: .6rem; white-space: nowrap; }
.footer-col h4 i { color: var(--accent-primary); }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; right: 0; width: 40px; height: 3px; background: var(--accent-gradient); border-radius: 3px; transition: width .4s ease; }
.footer-col:hover h4::after { width: 90px; }
html[dir="ltr"] .footer-col h4::after { right: auto; left: 0; }

.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.footer-links li { margin: 0 0 0.7rem 0; }
.footer-links li:last-child { margin-bottom: 0; }
.footer-links a { color: var(--text-muted); font-size: .95rem; display: flex; align-items: center; gap: .7rem; transition: all .3s ease; white-space: nowrap; padding: 0.1rem 0; line-height: 1.7; }
.footer-links a i { min-width: 20px; text-align: center; font-size: .9rem; color: var(--accent-primary); transition: transform .3s ease; }
.footer-links a:hover { color: var(--accent-primary); transform: translateX(-6px); }
.footer-links a:hover i { transform: scale(1.3) rotate(-10deg); }
html[dir="ltr"] .footer-links a:hover { transform: translateX(6px); }

.footer-contact-list { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.footer-contact-list li { margin-bottom: .9rem; display: flex; align-items: flex-start; gap: .9rem; color: var(--text-muted); font-size: .95rem; }
.footer-contact-list li:last-child { margin-bottom: 0; }
.footer-contact-list li i { color: var(--accent-primary); font-size: 1.1rem; min-width: 22px; margin-top: 3px; animation: icon-bounce 3s ease-in-out infinite; }
.footer-contact-list li a { color: var(--text-muted); transition: color .3s ease; direction: ltr; font-family: 'Roboto Mono', monospace; }
.footer-contact-list li a:hover { color: var(--accent-primary); }

.footer-trust .enamad-link { display: flex; justify-content: center; align-items: center; background: #ffffff; padding: 1.4rem 1.8rem; border-radius: 22px; border: 1px solid rgba(255,255,255,.15); transition: all .4s var(--easing); box-shadow: 0 15px 35px rgba(0,0,0,.2); width: fit-content; }
.footer-trust .enamad-link:hover { transform: translateY(-6px); box-shadow: 0 20px 45px rgba(var(--accent-rgb), .3); border-color: var(--accent-primary); }
.footer-trust img { max-width: 130px; height: auto; border-radius: 12px; }

.footer-marquee { padding: 1.4rem 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); overflow: hidden; margin-bottom: 2rem; direction: ltr; }
.footer-marquee-track { display: flex; width: max-content; animation: marquee-horizontal 50s linear infinite; will-change: transform; }
.marquee-group { display: flex; align-items: center; }
.marquee-group span { margin-inline-end: 3rem; white-space: nowrap; }
.marquee-group span:not(.sep) { font-family: 'Orbitron', sans-serif; font-size: 1.4rem; font-weight: 800; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: 2px; }
.marquee-group .sep { color: var(--accent-tertiary); -webkit-text-fill-color: var(--accent-tertiary); font-size: 1rem; opacity: .7; }

@keyframes marquee-horizontal { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

.footer-bottom { text-align: center; padding-top: 2rem; color: var(--text-muted); font-size: .92rem; display: flex; flex-direction: column; gap: .5rem; }
.heart-beat { color: var(--accent-tertiary); animation: heart-beat 1.4s ease-in-out infinite; display: inline-block; }

@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
}

.credit-name { color: var(--accent-primary); font-weight: 700; font-family: 'Orbitron', sans-serif; }

.back-to-top {
    position: fixed;
    bottom: 2rem;
    inset-inline-end: 2rem;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all .4s var(--easing);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), .4);
    will-change: transform;
}

.back-to-top.show { opacity: 1; visibility: visible; transform: none; }

/* ============================================================
   [20] RESPONSIVE - BULLETPROOF NAVIGATION FIX & MOBILE
   ============================================================ */
@media (max-width: 1280px) {
    .footer-grid { grid-template-columns: 1.4fr 1fr 1.1fr 1fr; gap: 2.2rem; }
    .nav-link { padding: .6rem 1rem; font-size: .9rem; }
}

@media (max-width: 1200px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 1024px) {
    .container { padding: 5rem 1.8rem; }
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .contact-main-grid { grid-template-columns: 1fr; gap: 2rem; }
    .stats-strip { grid-template-columns: repeat(2, 1fr); }
    
    .marquee-track { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
    .marquee-column:last-child { display: none; }
    .marquee-wrapper { height: 480px; padding: 1.5rem; }
    .skill-logo-card { padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
    .skill-logo-card img { width: 40px; height: 40px; }
    .skill-logo-card span { font-size: 0.95rem; }

    .mobile-toggle { display: flex; }
    
    .nav-menu {
        position: fixed; 
        top: 0; 
        right: 0; 
        width: 100%; 
        max-width: 320px; 
        height: 100vh;
        background: rgba(4,4,10,.98); 
        backdrop-filter: blur(30px);
        flex-direction: column; 
        justify-content: flex-start; 
        padding: 2.5rem 1.5rem;
        transform: translateX(100%); 
        z-index: 1005; /* Higher than overlay (999) */
        overflow-y: auto; 
        border-left: 2px solid rgba(var(--accent-rgb), .25);
        visibility: hidden; 
        opacity: 0;
        pointer-events: none;
        left: auto;
        flex: none;
        flex-wrap: nowrap;
    }
    
    .nav-menu.active {
        transform: translateX(0) !important;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    html[dir="ltr"] .nav-menu { right: auto; left: 0; transform: translateX(-100%); border-left: none; border-right: 2px solid rgba(var(--accent-rgb), .25); }
    html[dir="ltr"] .nav-menu.active { transform: translateX(0) !important; }

    [data-theme="light"] .nav-menu { background: rgba(255,255,255,.98); }
    
    .nav-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border-subtle); width: 100%; }
    .nav-menu-brand { font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--text-main); direction: ltr; display: flex; }
    .nav-menu-brand .dev { display: inline; font-size: .8rem; }
    .nav-menu-close { background: rgba(255,255,255,.06); border: 1px solid var(--border-subtle); color: var(--text-muted); font-size: 1.3rem; cursor: pointer; padding: .5rem .9rem; border-radius: 12px; transition: all .3s; }
    .nav-menu-close:hover { color: var(--accent-primary); transform: rotate(90deg); }
    .nav-link { font-size: 1.05rem; padding: 1rem 1.4rem; border-radius: 16px; width: 100%; background: rgba(255,255,255,.02); border: 1px solid transparent; }
}

@media (max-width: 768px) {
    .hero { padding: calc(var(--header-height) + 2rem) 1.5rem 4rem; min-height: 90vh; }
    .avatar-wrapper { width: 180px; height: 180px; margin-bottom: 1.5rem; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 0.95rem; min-height: 3em; }
    .section-header { margin-bottom: 2.5rem; }
    .section-title { font-size: 1.6rem; }
    .container { padding: 3.5rem 1rem; }
    .glass-card { padding: 1.5rem; border-radius: 20px; }
    .projects-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .card-header { height: 200px; }
    .contact-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
    .footer-col, nav.footer-col, address.footer-col, div.footer-col { align-items: center; }
    .footer-links, .footer-contact-list { align-items: center; }
    .footer-col h4 { justify-content: center; white-space: normal; }
    .footer-col h4::after { right: 50%; transform: translateX(50%); }
    html[dir="ltr"] .footer-col h4::after { left: 50%; right: auto; transform: translateX(-50%); }
    .footer-social { justify-content: center; }
    .footer-tech-badges { justify-content: center; }
    .footer-trust .enamad-link { margin: 0 auto; }
    .skills-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .availability-details { flex-direction: column; gap: 1rem; }
    .marquee-group span:not(.sep) { font-size: 1.1rem; }
    .contact-hero-badges { gap: .6rem; }
    .hero-badge { padding: .55rem 1.1rem; font-size: .85rem; }
    .hero-badge i { font-size: 1rem; }

    .marquee-track { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .marquee-column:nth-child(1) { display: flex; }
    .marquee-column:nth-child(2) { display: flex; }
    .marquee-column:nth-child(3) { display: none; }
    .marquee-column:nth-child(4) { display: none; }
    .marquee-wrapper { height: 400px; padding: 1rem; border-radius: 20px; }
    .skill-logo-card { padding: 0.75rem 0.8rem; margin-bottom: 0.8rem; border-radius: 14px; gap: 0.5rem; }
    .skill-logo-card img { width: 32px; height: 32px; }
    .skill-logo-card span { font-size: 0.85rem; font-weight: 600; }
    
    .faq-question { padding: 1rem 1.2rem; font-size: 0.95rem; }
    .faq-q-icon { min-width: 34px; height: 34px; font-size: 1rem; }
    .faq-answer { padding: 1rem 1.2rem 1.5rem; font-size: 0.9rem; }
    
    .hero-cta { flex-direction: column; gap: 0.8rem; }
    .hero-cta a { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .container { padding: 3rem 1rem; }
    .brand { font-size: .95rem; }
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: .85rem; }
    .tech-pill { font-size: .75rem; padding: .4rem 1rem; }
    .tech-pill img { width: 18px; height: 18px; }
    .btn-primary, .btn-secondary { padding: .9rem 1.5rem; font-size: .95rem; }
    .avatar-wrapper { width: 160px; height: 160px; }
    .section-title { font-size: 1.4rem; }
    .contact-grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
    .contact-item { padding: 1.5rem 1rem; }
    .contact-icon { width: 56px; height: 56px; }
    .contact-icon img { width: 36px; height: 36px; }
    .site-footer { padding: 0 1rem 2rem; }
    .stat-number { font-size: 1.5rem; }
    .stat-label { font-size: 0.8rem; }
    .marquee-wrapper { height: 350px; padding: 0.8rem; }
    .skill-logo-card { padding: 0.55rem 0.5rem; gap: 0.35rem; margin-bottom: 0.6rem; border-radius: 12px; }
    .skill-logo-card img { width: 24px; height: 24px; }
    .skill-logo-card span { font-size: 0.7rem; }
}

@media (max-width: 360px) {
    .contact-grid { grid-template-columns: 1fr; }
    .brand { font-size: .85rem; }
    .marquee-track { grid-template-columns: 1fr; gap: 0.6rem; }
    .marquee-column:nth-child(2) { display: none; }
    .marquee-wrapper { height: 300px; padding: 0.8rem; }
    .skill-logo-card { padding: 0.7rem 0.7rem; gap: 0.5rem; }
    .skill-logo-card img { width: 28px; height: 28px; }
    .skill-logo-card span { font-size: 0.75rem; }
}

/* ============================================================
   [21] CONTACT PAGE
   ============================================================ */
.contact-page .site-footer { margin-top: 4rem; }
.mini-footer { padding: 0 2rem 2rem; }
.contact-main { padding-top: calc(var(--header-height) + 2rem); }

.contact-hero { min-height: 42vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4rem 2rem; position: relative; }
.contact-hero-content { max-width: 800px; position: relative; z-index: 2; }
.contact-hero-text { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem 1.4rem; background: rgba(var(--accent-rgb), .08); border: 1px solid rgba(var(--accent-rgb), .3); border-radius: var(--radius-pill); color: var(--accent-primary); font-family: 'Roboto Mono', monospace; font-weight: 600; margin-bottom: 1.5rem; }
.contact-hero-text i { animation: icon-bounce 2s ease-in-out infinite; }
.contact-hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 900; margin-bottom: 1rem; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.contact-hero p { color: var(--text-muted); font-size: 1.2rem; max-width: 600px; margin: 0 auto; }
.contact-hero-badges { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-badge { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.4rem; background: var(--glass-bg); border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); color: var(--text-main); font-weight: 600; font-size: .95rem; backdrop-filter: blur(10px); transition: all .3s ease; }
.hero-badge i { color: var(--accent-primary); font-size: 1.1rem; animation: icon-bounce 2s ease-in-out infinite; }
.hero-badge:nth-child(2) i { animation-delay: .4s; }
.hero-badge:nth-child(3) i { animation-delay: .8s; }
.hero-badge:hover { border-color: var(--accent-primary); transform: translateY(-4px); box-shadow: 0 10px 25px rgba(var(--accent-rgb), .25); }

.contact-section { padding-bottom: 3rem; }
.contact-main-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: start; }

.info-card h2, .form-card h2 { font-size: 1.5rem; color: var(--accent-primary); margin-bottom: 1rem; font-weight: 800; display: flex; align-items: center; gap: .7rem; }
.info-card p { color: var(--text-muted); margin-bottom: 2rem; }
.info-card .info-list { display: flex; flex-direction: column; gap: 1rem; }

.info-row { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 16px; transition: all .3s ease; opacity: 1; transform: none; }
.info-row:hover { border-color: var(--accent-primary); transform: translateX(-8px); background: rgba(var(--accent-rgb), .05); }
html[dir="ltr"] .info-row:hover { transform: translateX(8px); }

.info-icon { width: 54px; height: 54px; background: rgba(var(--accent-rgb), .08); border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: .5rem; }
.info-icon img { width: 32px; height: 32px; object-fit: contain; }
.info-icon img, .info-phone-icon { animation: icon-bounce 3s ease-in-out infinite; }
.info-phone-icon { color: var(--accent-primary); font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); }

.info-details { display: flex; flex-direction: column; }
.info-details .info-label { font-size: .8rem; color: var(--text-muted); font-weight: 600; }
.info-details .info-value { font-size: 1rem; color: var(--text-main); font-weight: 700; direction: ltr; font-family: 'Roboto Mono', monospace; }

.info-arrow { color: var(--accent-primary); font-size: .9rem; margin-inline-start: auto; opacity: 0; transform: translateX(10px); transition: all .3s ease; }
html[dir="ltr"] .info-arrow { transform: translateX(-10px); }
.info-row:hover .info-arrow { opacity: 1; transform: translateX(0); }
html[dir="ltr"] .info-row:hover .info-arrow { transform: translateX(0); }

.form-desc { color: var(--text-muted); margin-bottom: 1.5rem; font-size: .98rem; }
.form-card .contact-form { margin-top: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: .5rem; color: var(--text-main); font-weight: 600; font-size: .95rem; }
.input-wrapper { position: relative; display: flex; align-items: center; }

.input-wrapper i {
    position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
    color: var(--accent-primary); font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.15rem);
    z-index: 2; pointer-events: none; transition: color .3s ease;
}
html[dir="ltr"] .input-wrapper i { right: auto; left: 1.1rem; }

.textarea-wrapper { align-items: flex-start; }
.textarea-wrapper i { top: 1.2rem; transform: none; }
.input-wrapper:focus-within i { color: var(--accent-tertiary); }

.input-wrapper input, .input-wrapper textarea {
    width: 100%; padding: 1rem; padding-right: 3rem;
    background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 14px;
    color: var(--text-main); font-family: 'Vazirmatn', sans-serif;
    font-size: clamp(0.92rem, 0.88rem + 0.3vw, 1rem); transition: all .3s ease;
}
html[dir="ltr"] .input-wrapper input, html[dir="ltr"] .input-wrapper textarea { padding-right: 1rem; padding-left: 3rem; }
[data-theme="light"] .input-wrapper input, [data-theme="light"] .input-wrapper textarea { background: #f0f9ff; }

.input-wrapper textarea { resize: vertical; min-height: 120px; }
.input-wrapper input::placeholder, .input-wrapper textarea::placeholder { color: var(--text-muted); opacity: .6; }
.input-wrapper input:focus, .input-wrapper textarea:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .12); }

.form-card { background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
[data-theme="light"] .form-card { background: #ffffff; border-color: rgba(14, 165, 233, 0.14); box-shadow: 0 12px 40px rgba(6, 182, 212, 0.10); }
.form-card:hover { transform: translateY(-6px); }

.btn-submit { width: 100%; justify-content: center; padding: 1.2rem 2rem; font-size: 1.1rem; }

.alert { padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 1.5rem; display: flex; align-items: center; gap: .8rem; font-weight: 600; }
.alert-success { background: rgba(16,185,129,.1); color: #10b981; border: 1px solid rgba(16,185,129,.3); }
.alert-error { background: rgba(239,68,68,.1); color: #ef4444; border: 1px solid rgba(239,68,68,.3); }

.availability-box { margin-top: 3rem; padding: 2.5rem; text-align: center; }
.availability-status { display: inline-flex; align-items: center; gap: 1rem; font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; }
.status-dot-large { width: 14px; height: 14px; background: #10b981; border-radius: 50%; box-shadow: 0 0 20px #10b981; animation: pulse-dot 1.5s ease-in-out infinite; }
.availability-details { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.availability-details div { display: flex; align-items: center; gap: .6rem; color: var(--text-muted); }
.availability-details i { color: var(--accent-primary); font-size: 1.2rem; animation: icon-bounce 3s ease-in-out infinite; }

@media (max-width: 640px) {
    .input-wrapper i { right: 0.9rem; }
    html[dir="ltr"] .input-wrapper i { left: 0.9rem; }
    .input-wrapper input, .input-wrapper textarea { padding-right: 2.7rem; }
    html[dir="ltr"] .input-wrapper input, html[dir="ltr"] .input-wrapper textarea { padding-right: 1rem; padding-left: 2.7rem; }
    .form-card, .info-card { padding: 1.8rem 1.2rem; }
    .form-card h2, .info-card h2 { font-size: 1.25rem; }
}

@media (max-width: 380px) {
    .input-wrapper i { right: 0.75rem; font-size: 0.88rem; }
    html[dir="ltr"] .input-wrapper i { left: 0.75rem; }
    .input-wrapper input, .input-wrapper textarea { padding-right: 2.4rem; }
    html[dir="ltr"] .input-wrapper input, html[dir="ltr"] .input-wrapper textarea { padding-left: 2.4rem; }
    .btn-submit { padding: 1rem 1.4rem; font-size: 0.98rem; }
}

/* ============================================================
   [22] ULTIMATE MOBILE RESPONSIVE & SKILLS RESTORE (NEW)
   ============================================================ */
@media (max-width: 768px) {
    body { font-size: 15px; }
    
    .container { padding: 4rem 1rem !important; }
    .section-header { margin-bottom: 2.5rem !important; }
    .section-title { font-size: 1.6rem !important; }
    .section-subtitle { font-size: 0.95rem !important; }

    header { height: 65px !important; }
    header nav { padding: 0 1rem !important; gap: 0.5rem !important; }
    
    /* Fix Brand Logo to show -dev */
    .brand { font-size: 1.1rem !important; white-space: nowrap !important; }
    .brand .dev { display: inline !important; } 

    .nav-controls { gap: 0.5rem !important; }
    .theme-toggle, .lang-toggle, .mobile-toggle { padding: 0.5rem 0.6rem !important; font-size: 1rem !important; min-width: 40px !important; min-height: 40px !important; }

    .hero { padding: calc(65px + 2rem) 1rem 3rem !important; min-height: 100vh; }
    .avatar-wrapper { width: 160px !important; height: 160px !important; margin-bottom: 1.5rem !important; }
    .hero-tag { font-size: 0.8rem !important; padding: 0.4rem 1rem !important; margin-bottom: 1rem !important; }
    .hero-title { font-size: 1.8rem !important; }
    .hero-subtitle { font-size: 0.9rem !important; min-height: 3em; }
    .tech-stack { gap: 0.5rem !important; margin-bottom: 2rem !important; }
    .tech-pill { font-size: 0.75rem !important; padding: 0.4rem 0.8rem !important; }
    .tech-pill img { width: 18px !important; height: 18px !important; }
    .hero-cta { flex-direction: column !important; gap: 0.8rem !important; width: 100%; }
    .hero-cta a { width: 100%; justify-content: center; padding: 0.9rem 1.5rem !important; font-size: 1rem !important; }

    .stats-strip { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; }
    .stat-card { padding: 1.5rem 0.5rem !important; }
    .stat-icon { width: 50px !important; height: 50px !important; font-size: 1.3rem !important; border-radius: 14px !important; }
    .stat-number { font-size: 1.5rem !important; }
    .stat-label { font-size: 0.8rem !important; }

        /* Mobile Marquee: 2 Columns, Full Width, Seamless Infinite Loop */
    .marquee-wrapper { 
        height: 450px !important; /* ارتفاع مناسب برای نمایش ۳ الی ۴ آیتم در هر ستون */
        padding: 1rem !important; 
        margin: 2rem 0 !important;
    }
    .marquee-track { 
        grid-template-columns: repeat(2, 1fr) !important; /* دقیقا 2 ستون کنار هم */
        gap: 1rem !important; 
    }
    /* مخفی کردن ستون‌های ۳ و ۴ در موبایل برای تمیز ماندن صفحه */
    .marquee-column:nth-child(3), .marquee-column:nth-child(4) { 
        display: none !important; 
    }
    .marquee-column { 
        display: flex !important; 
        gap: 1rem !important; /* فاصله بین آیتم‌ها برای پر کردن فضا */
    }
    .marquee-content { 
        gap: 1rem !important; 
    }
    .skill-logo-card { 
        padding: 1rem !important; 
        gap: 0.6rem !important; 
        margin-bottom: 0 !important; 
        border-radius: 14px !important; 
        width: 100%; /* پر کردن کامل عرض ستون */
    }
    .skill-logo-card img { 
        width: 32px !important; 
        height: 32px !important; 
    }
    .skill-logo-card span { 
        font-size: 0.9rem !important; 
        font-weight: 600; 
    }
    /* Restore Skills Grid to 2 columns */
    .about-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
    .glass-card { padding: 1.5rem !important; }
    .skills-grid { grid-template-columns: 1fr 1fr !important; gap: 1rem 1.2rem !important; margin-top: 1rem !important; }
    .skill-meta { font-size: 0.75rem !important; }
    .progress-bg { height: 8px !important; }
    .info-list li { padding: 0.8rem 0 !important; font-size: 0.9rem !important; }

    .projects-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
    .card-header { height: 200px !important; }
    .card-body { padding: 1.5rem !important; }
    .project-title { font-size: 1.1rem !important; }
    .project-desc { font-size: 0.9rem !important; }
    .quality-box { margin-top: 3rem !important; padding: 2rem 1.5rem !important; }

    .faq-question { padding: 1rem 1.2rem !important; font-size: 0.95rem !important; }
    .faq-q-icon { min-width: 36px !important; height: 36px !important; font-size: 0.9rem !important; }
    .faq-answer { padding: 1rem 1.2rem 1.5rem !important; font-size: 0.9rem !important; }

    .contact-grid { grid-template-columns: 1fr 1fr !important; gap: 1rem !important; }
    .contact-item { padding: 1.5rem 0.5rem !important; }
    .contact-icon { width: 50px !important; height: 50px !important; padding: 0.7rem !important; }
    .contact-icon img { width: 32px !important; height: 32px !important; }
    .contact-item h3 { font-size: 0.9rem !important; }
    .contact-item p { font-size: 0.7rem !important; }
    .contact-cta-box { padding: 2rem 1.5rem !important; margin-top: 2rem !important; }

    .footer-grid { grid-template-columns: 1fr !important; gap: 2.5rem !important; text-align: center !important; }
    .footer-col, nav.footer-col, address.footer-col, div.footer-col { align-items: center !important; }
    .footer-links, .footer-contact-list { align-items: center !important; }
    .footer-col h4 { justify-content: center !important; white-space: normal !important; }
    .footer-col h4::after { right: 50% !important; transform: translateX(50%) !important; left: auto !important; }
    .footer-social { justify-content: center !important; }
    .footer-tech-badges { justify-content: center !important; }
    .footer-trust .enamad-link { margin: 0 auto !important; }
}

@media (max-width: 400px) {
    .contact-grid { grid-template-columns: 1fr !important; }
    .hero-title { font-size: 1.5rem !important; }
    /* Removed the code that hid the '-dev' */
    .nav-menu { max-width: 90% !important; }
}