/* ==========================================================================
   Kebria — Portfolio / Projects section
   استایل کارت پروژه‌ها، فیلترها، منوی موبایل و فرم تماس
   ========================================================================== */

/* ===== Project filters ===== */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm, 0.75rem);
    margin-bottom: var(--space-2xl, 3rem);
}

.filter-chip {
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary, #a1a1aa);
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-chip:hover {
    border-color: rgba(102, 126, 234, 0.5);
    color: var(--text-primary, #fff);
}

.filter-chip.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    color: #fff;
}

.project-card.is-hidden {
    display: none;
}

/* ===== Card head: icon + status badge ===== */
.project-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm, 0.75rem);
    margin-bottom: var(--space-sm, 0.75rem);
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.project-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.project-status.is-live {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.28);
}

.project-status.is-live::before {
    animation: statusPulse 2s ease-in-out infinite;
}

.project-status.is-beta {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.28);
}

.project-status.is-private {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.28);
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 currentColor;
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 0 4px rgba(52, 211, 153, 0);
    }
}

/* ===== Domain + stack meta ===== */
.project-domain {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    color: rgba(102, 126, 234, 0.9);
    direction: ltr;
    text-align: right;
    margin-bottom: var(--space-sm, 0.75rem);
    unicode-bidi: embed;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: var(--space-md, 1rem) 0;
    padding-top: var(--space-md, 1rem);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.75rem;
    color: var(--text-muted, #71717a);
    direction: ltr;
    justify-content: flex-end;
}

.project-stack span {
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md, 1rem);
    margin-top: auto;
}

.project-link.secondary {
    color: var(--text-secondary, #a1a1aa);
    font-size: 0.85rem;
}

.project-link.is-disabled {
    color: var(--text-muted, #71717a);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.65;
}

.project-card {
    display: flex;
    flex-direction: column;
}

/* ===== Lab / side projects ===== */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg, 1.5rem);
}

.lab-card {
    display: flex;
    align-items: center;
    gap: var(--space-md, 1rem);
    padding: var(--space-lg, 1.5rem);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lab-card:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.07);
}

.lab-card .lab-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.lab-card h4 {
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.lab-card p {
    font-size: 0.8rem;
    color: var(--text-secondary, #a1a1aa);
    margin: 0;
}

/* ===== Mobile navigation ===== */
.nav-mobile {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg, 1.5rem);
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.nav-mobile.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-mobile a {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    text-decoration: none;
    padding: 0.4rem 1rem;
    transition: color 0.2s ease;
}

.nav-mobile a:hover,
.nav-mobile a:focus-visible {
    color: #667eea;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

body.menu-open {
    overflow: hidden;
}

@media (min-width: 769px) {
    .nav-mobile {
        display: none;
    }
}

/* ===== Contact form status ===== */
.form-status {
    display: none;
    align-items: center;
    gap: 0.6rem;
    margin-top: var(--space-md, 1rem);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.form-status.success-message,
.form-status.error-message {
    display: flex;
}

.form-status.success-message {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.form-status.error-message {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* honeypot – hidden from humans, visible to naive bots */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Accessibility ===== */
.skip-link {
    position: absolute;
    top: -60px;
    right: 1rem;
    z-index: 1200;
    padding: 0.6rem 1.2rem;
    border-radius: 0 0 10px 10px;
    background: #667eea;
    color: #fff;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Select inside contact form ===== */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    padding-left: 2.4rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    cursor: pointer;
}

select.form-input option {
    background: #14141c;
    color: #fff;
}
