/* ══ صفحه تماس — تک‌صفحه + مودال ══ */

body.page-contact {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #050b14;
    overflow: hidden;
    position: relative;
    color: #fff;
    padding: 16px;
    font-family: 'Vazirmatn', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.page-contact #app {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

body.page-contact.no-scroll {
    overflow: hidden;
}

body.page-contact * {
    box-sizing: border-box;
}

/* ── پس‌زمینه ── */
body.page-contact #techCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body.page-contact .aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

body.page-contact .aurora span {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: auroraDrift 14s ease-in-out infinite alternate;
}

body.page-contact .aurora span:nth-child(1) {
    width: 55vw; height: 55vw;
    top: -20%; right: -10%;
    background: radial-gradient(circle, #00f2fe 0%, transparent 70%);
}

body.page-contact .aurora span:nth-child(2) {
    width: 45vw; height: 45vw;
    bottom: -25%; left: -15%;
    background: radial-gradient(circle, #4facfe 0%, transparent 70%);
    animation-delay: -5s;
}

body.page-contact .aurora span:nth-child(3) {
    width: 30vw; height: 30vw;
    top: 40%; left: 35%;
    background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
    opacity: 0.2;
    animation-delay: -9s;
}

@keyframes auroraDrift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, -20px) scale(1.08); }
}

/* ── کارت اصلی ── */
body.page-contact .page-wrap {
    width: min(820px, 100%);
    z-index: 10;
    position: relative;
    animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

body.page-contact .hero-card {
    background: rgba(22, 26, 36, 0.55);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-top-color: rgba(255, 255, 255, 0.16);
    border-left-color: rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    padding: clamp(22px, 4vw, 36px);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2.5vw, 22px);
    max-height: calc(100dvh - 32px);
}

body.page-contact .hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.page-contact .site-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(0, 242, 254, 0.75);
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(0, 242, 254, 0.06);
    border: 1px solid rgba(0, 242, 254, 0.15);
}

body.page-contact .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.22);
}

body.page-contact .status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.25);
    animation: statusPulse 2.5s ease infinite;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.25); }
    50%      { box-shadow: 0 0 0 6px rgba(52, 199, 89, 0.08); }
}

body.page-contact .hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(16px, 3vw, 28px);
    align-items: center;
}

body.page-contact .hero-identity {
    min-width: 0;
}

body.page-contact .avatar {
    width: 64px; height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.4), rgba(79, 172, 254, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 28px rgba(0, 242, 254, 0.18);
    margin-bottom: 14px;
}

body.page-contact .avatar span {
    line-height: 1;
}

body.page-contact .hero-identity h1 {
    font-size: clamp(1.75rem, 5vw, 2.35rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff 40%, rgba(0, 242, 254, 0.85));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.page-contact .hero-identity h2 {
    font-size: 14px;
    color: #4facfe;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

body.page-contact .hero-identity h2 #roleText {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    font-weight: 500;
}

body.page-contact p.bio {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.68);
    margin: 0;
}

/* ── متریک‌ها ── */
body.page-contact .hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

body.page-contact .metric {
    text-align: center;
    padding: 14px 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: border-color 0.25s, transform 0.25s;
}

body.page-contact .metric:hover {
    border-color: rgba(0, 242, 254, 0.3);
    transform: translateY(-2px);
}

body.page-contact .metric strong {
    display: block;
    font-family: 'Vazirmatn', sans-serif;
    font-size: clamp(1.05rem, 3vw, 1.2rem);
    color: #00f2fe;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

body.page-contact .metric small {
    display: block;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
}

/* ── مهارت‌ها ── */
body.page-contact .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

body.page-contact .skill-tags span {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 9px;
    background: rgba(0, 242, 254, 0.05);
    border: 1px solid rgba(0, 242, 254, 0.16);
    color: rgba(0, 242, 254, 0.88);
    transition: background 0.2s, border-color 0.2s;
}

body.page-contact .skill-tags span:hover {
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.38);
}

/* ── فوتر: اطلاعات + CTA ── */
body.page-contact .hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-contact .footer-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}

body.page-contact .contact-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.page-contact .contact-chips span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-contact .contact-chips i {
    color: #00f2fe;
    font-size: 12px;
}

body.page-contact .social-links {
    display: flex;
    gap: 8px;
}

body.page-contact .social-links a {
    text-decoration: none;
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    transition: all 0.25s ease;
}

body.page-contact .social-links a.social-tg:hover { background: #2aabee; border-color: #2aabee; }

body.page-contact .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border: none;
    border-radius: 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    color: #050b14;
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    box-shadow: 0 8px 28px rgba(0, 242, 254, 0.3);
    transition: transform 0.25s, box-shadow 0.25s;
    white-space: nowrap;
    flex-shrink: 0;
}

body.page-contact .cta-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 36px rgba(0, 242, 254, 0.4);
}

body.page-contact .cta-btn i {
    font-size: 14px;
}

/* ══ مودال تماس ══ */
body.page-contact .modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

body.page-contact .modal.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

body.page-contact .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 11, 20, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

body.page-contact .modal-panel {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    background: rgba(24, 28, 38, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
    transform: translateY(24px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-contact .modal.is-open .modal-panel {
    transform: none;
}

body.page-contact .modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px; height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

body.page-contact .modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

body.page-contact .modal-panel h3 {
    margin: 0 0 22px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    padding-left: 44px;
}

body.page-contact .modal-panel h3 i {
    color: #00f2fe;
}

/* ── فرم ── */
body.page-contact .input-group {
    margin-bottom: 16px;
    position: relative;
}

body.page-contact .input-group i.field-icon {
    position: absolute;
    right: 14px;
    top: 15px;
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    font-size: 14px;
}

body.page-contact .input-group textarea + i.field-icon {
    top: 16px;
}

body.page-contact .input-group input,
body.page-contact .input-group textarea {
    width: 100%;
    padding: 13px 42px 13px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.25s, background 0.25s;
}

body.page-contact .input-group input:focus,
body.page-contact .input-group textarea:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 242, 254, 0.45);
}

body.page-contact .input-group textarea {
    resize: none;
    height: 88px;
}

body.page-contact .input-ltr {
    direction: ltr;
    text-align: start;
}

body.page-contact .captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

body.page-contact .captcha-box {
    background: #1e1e24;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    padding: 4px;
    line-height: 0;
}

body.page-contact .captcha-box img {
    border-radius: 6px;
    display: block;
    cursor: pointer;
    width: 160px;
    height: 44px;
    object-fit: fill;
}

body.page-contact .captcha-wrapper .captcha-input {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

body.page-contact .captcha-wrapper .captcha-input input {
    height: 44px;
    padding: 0 12px !important;
    text-align: center;
    letter-spacing: 0.05em;
}

body.page-contact .contact-submit {
    width: 100%;
    padding: 14px;
    background: #fff;
    color: #050b14;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.25s;
}

body.page-contact .contact-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

body.page-contact .contact-submit.is-success {
    background: #34c759 !important;
    color: #fff !important;
}

body.page-contact .contact-submit.is-loading {
    background: #e0e0e0 !important;
    color: #050b14 !important;
}

/* ── Toast ── */
body.page-contact #toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(400px, calc(100vw - 32px));
}

body.page-contact .toast-item {
    background: rgba(40, 40, 45, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 14px 20px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    font-size: 14px;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
}

body.page-contact .toast-item.success { border-right: 4px solid #34c759; }
body.page-contact .toast-item.error   { border-right: 4px solid #ff3b30; }
body.page-contact .toast-item.success i { color: #34c759; }
body.page-contact .toast-item.error i   { color: #ff3b30; }

body.page-panel,
body.page-login {
    display: block;
    padding: 0;
    align-items: unset;
    justify-content: unset;
}

@media (prefers-reduced-motion: reduce) {
    body.page-contact .page-wrap,
    body.page-contact .status-dot,
    body.page-contact .aurora span,
    body.page-contact .modal-panel { animation: none; transition: none; }
}

@media (max-width: 640px) {
    body.page-contact {
        height: auto;
        min-height: 100dvh;
        overflow-y: auto;
        align-items: flex-start;
        padding: 12px;
    }

    body.page-contact #app {
        align-items: flex-start;
        padding: 6px 0 20px;
    }

    body.page-contact .page-wrap {
        width: 100%;
    }

    body.page-contact .hero-card {
        max-height: none;
        padding: 20px 18px;
        border-radius: 22px;
    }

    body.page-contact .hero-top {
        flex-wrap: wrap;
        gap: 8px;
    }

    body.page-contact .hero-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    body.page-contact .hero-metrics {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    body.page-contact .metric {
        padding: 10px 6px;
    }

    body.page-contact .metric strong {
        font-size: 1rem;
    }

    body.page-contact .hero-identity h1 {
        font-size: 1.65rem;
    }

    body.page-contact .hero-identity h2 {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    body.page-contact .hero-identity h2 #roleText {
        font-size: 13px;
        line-height: 1.5;
    }

    body.page-contact p.bio {
        font-size: 13.5px;
    }

    body.page-contact .hero-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    body.page-contact .footer-left {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    body.page-contact .contact-chips {
        justify-content: center;
        width: 100%;
    }

    body.page-contact .contact-chips span {
        font-size: 11px;
    }

    body.page-contact .cta-btn {
        width: 100%;
        justify-content: center;
    }

    body.page-contact .captcha-wrapper {
        flex-wrap: wrap;
    }
}

@media (max-width: 380px) {
    body.page-contact .hero-metrics {
        gap: 6px;
    }

    body.page-contact .metric strong {
        font-size: 0.9rem;
    }

    body.page-contact .metric small {
        font-size: 10px;
    }

    body.page-contact .skill-tags span {
        font-size: 11px;
        padding: 4px 8px;
    }
}
