/* ========== فونت‌های لوکال ========== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/inter-v20-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/inter-v20-latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/inter-v20-latin-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/fonts/inter-v20-latin-800.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('/fonts/inter-v20-latin-900.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/jetbrains-mono-v24-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/jetbrains-mono-v24-latin-700.woff2') format('woff2');
}

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

/* ========== متغیرهای رنگی ========== */
:root {
    --bg-dark: #000000;
    --bg-card: #0a0a0a;
    --text-main: #ffffff;
    --text-muted: #888888;
    --border-color: #222222;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--text-muted);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2vw;
}

/* --- Navbar --- */
header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

.nav-section {
    flex: 1;
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-right { justify-content: flex-start; }

.nav-section a.active {
    border-bottom: 2px solid var(--text-main);
    padding-bottom: 4px;
}

.logo {
    flex: 1;
    text-align: center;
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

.logo-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: contain;
}

.nav-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

.btn-outline {
    padding: 7px 18px;
    border: 1px solid var(--text-main);
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
    cursor: pointer;
}

.btn-outline:hover {
    background: var(--text-main);
    color: #000;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    order: -1;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: 0.3s;
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 999;
}

/* --- عنوان صفحه --- */
.page-hero {
    padding: 60px 0 40px;
    text-align: center;
}

.page-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.page-hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* --- گرید --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* --- کارت --- */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--text-main);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.05);
}

.card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #111;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card h4 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex: 1;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.card-tags span {
    font-size: 0.7rem;
    padding: 2px 10px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: monospace;
}

.card-meta {
    margin-top: 20px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* --- فوتر --- */
footer {
    border-top: 1px solid var(--border-color);
    padding: 50px 0;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    list-style: none;
    flex-wrap: wrap;
}

.social-links a {
    font-family: monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: monospace;
}


/* ========== ریسپانسیو ========== */
@media (max-width: 768px) {
    .nav-right, .nav-actions { display: none; }
    .logo { position: static; text-align: center; flex: 1; }
    .hamburger { display: block; }
    .nav-wrapper { height: auto; padding: 15px 0; gap: 15px; flex-wrap: wrap; justify-content: center; }

    .mobile-open .nav-right {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0; right: 0;
        width: 260px; height: 100vh;
        background: #000;
        border-left: 1px solid var(--border-color);
        padding: 80px 24px;
        gap: 20px;
        z-index: 1001;
    }
    .mobile-open .mobile-overlay { display: block; }

    .page-hero h1 { font-size: 1.7rem; }
    .grid-container { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 600px) {
    .grid-container { grid-template-columns: 1fr; }
}