.contact-section {
    padding: 60px 0 80px;
    background:
        radial-gradient(ellipse at 10% 30%, rgba(6, 182, 212, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 70%, rgba(99, 102, 241, 0.04) 0%, transparent 50%);
}

.contact-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-section-header h2 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 0;
    color: var(--primary-color);
}

.contact-section-header h2::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border-radius: 2px;
    margin: 8px auto 20px;
}

.contact-availability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.09);
    border: 1.5px solid rgba(34, 197, 94, 0.4);
    color: #15803d;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 999px;
    margin: 20px auto 0;
    letter-spacing: 0.2px;
}

.contact-availability-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    flex-shrink: 0;
    animation: contactDotPulse 2s ease-in-out infinite;
}

@keyframes contactDotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

[data-theme="dark"] .contact-availability {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.contact-subtitle {
    color: #64748b;
    font-size: 16px;
    line-height: 1.8;
}

.contact-success {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f0fdf4;
    color: #065f46;
    border: 1px solid #bbf7d0;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 500;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.contact-reach-label {
    font-size: 13px;
    color: #94a3b8;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 16px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 20px 24px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    color: var(--text-color);
}

.contact-link:hover {
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.12);
    border-color: #bae6fd;
    transform: translateX(4px);
    color: var(--text-color);
}

.contact-link-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    transition: box-shadow 0.25s ease;
}

.contact-link:hover .contact-link-icon {
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.contact-link-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.contact-link-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.contact-link-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    transition: color 0.2s ease;
}

.contact-link:hover .contact-link-value {
    color: #0284c7;
}

.contact-form-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.contact-form-card #contact-ajax-msg {
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 1rem;
}

.contact-form-card .form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.3px;
}

.contact-form-card .form-control {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    color: #374151;
    background: #f8fafc;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.contact-form-card .form-control::placeholder {
    color: #94a3b8;
}

.contact-form-card .form-control:focus {
    border-color: #06b6d4;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
    outline: none;
}

.contact-form-card textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.contact-form-card input[type="file"].form-control {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.contact-form-card input[type="file"]::file-selector-button {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 8px 16px;
    color: #0284c7;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-right: 10px;
}

.contact-form-card input[type="file"]::file-selector-button:hover {
    background: #e0f2fe;
}

.contact-form-card .text-muted {
    color: #94a3b8;
    font-size: 13px;
}

.field-error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.contact-submit-btn {
    width: 100%;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border: none;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
    transition: filter 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    margin-top: 8px;
}

.contact-submit-btn:hover {
    color: #fff;
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.4);
}

/* ── Staggered reveal for contact links ─────────────────────────────────────── */
@keyframes revealFromLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes revealFromRight {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes revealFromBottom {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
    .contact-section.is-visible .contact-link:nth-child(1) { animation: revealFromLeft 0.55s ease 0.1s  backwards; }
    .contact-section.is-visible .contact-link:nth-child(2) { animation: revealFromLeft 0.55s ease 0.22s backwards; }
    .contact-section.is-visible .contact-link:nth-child(3) { animation: revealFromLeft 0.55s ease 0.34s backwards; }
    .contact-section.is-visible .contact-link:nth-child(4) { animation: revealFromLeft 0.55s ease 0.46s backwards; }

    .contact-section.is-visible .contact-form-card { animation: revealFromBottom 0.65s ease 0.2s backwards; }

    [dir="rtl"] .contact-section.is-visible .contact-link:nth-child(1) { animation-name: revealFromRight; }
    [dir="rtl"] .contact-section.is-visible .contact-link:nth-child(2) { animation-name: revealFromRight; }
    [dir="rtl"] .contact-section.is-visible .contact-link:nth-child(3) { animation-name: revealFromRight; }
    [dir="rtl"] .contact-section.is-visible .contact-link:nth-child(4) { animation-name: revealFromRight; }
}

@media (max-width: 768px) {
    /* Drop the dual radial-gradient background on mobile to cut first-scroll
       paint cost; same rationale as tech-stack / recommendations sections. */
    .contact-section {
        padding: 32px 0 48px;
        background: none;
    }

    .contact-container {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2rem;
    }

    .contact-info {
        display: contents;
    }

    .contact-reach-label {
        width: 100%;
        margin-bottom: 8px;
    }

    .contact-form-card {
        order: 3;
        width: 100%;
        padding: 1.25rem;
        box-sizing: border-box;
    }

    .contact-links {
        order: 4;
        width: 100%;
    }

    .contact-link {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .contact-section-header h2 {
        font-size: 28px;
    }

    .contact-subtitle {
        font-size: 14px;
    }

    .contact-link {
        padding: 12px 14px;
    }

    .contact-link-icon {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .contact-form-card {
        padding: 1rem;
    }
}

[dir="rtl"] .contact-link-label {
    letter-spacing: 0;
}

[dir="rtl"] .contact-link:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .contact-link-label {
    letter-spacing: 0;
}

.contact-ajax-msg {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.contact-ajax-msg.feedback-ok {
    background: #d1fae5;
    color: #065f46;
}

.contact-ajax-msg.feedback-error {
    background: #fee2e2;
    color: #991b1b;
}

/* ── Dark mode overrides ─────────────────────────────────────────────────── */
[data-theme="dark"] .contact-link {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .contact-link-value {
    color: #e2e8f0;
}

[data-theme="dark"] .contact-form-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .contact-form-card .form-label {
    color: #cbd5e1;
}

[data-theme="dark"] .contact-form-card .form-control {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .contact-form-card .form-control::placeholder {
    color: #475569;
}

[data-theme="dark"] .contact-form-card .form-control:focus {
    background: #0f172a;
    border-color: #06b6d4;
}

[data-theme="dark"] .contact-form-card input[type="file"]::file-selector-button {
    background: #334155;
    border-color: #475569;
    color: #60a5fa;
}

[data-theme="dark"] .contact-form-card input[type="file"]::file-selector-button:hover {
    background: #475569;
}

[data-theme="dark"] .contact-ajax-msg.feedback-ok {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .contact-ajax-msg.feedback-error {
    background: #7f1d1d;
    color: #fca5a5;
}