/* ============================================
   FONT FACE - IRAN ROUNDED
   ============================================ */
   @font-face {
    font-family: 'IRAN Rounded';
    src: url('../fonts/eot/IRAN-Rounded.eot');
    src: url('../fonts/eot/IRAN-Rounded.eot?#iefix') format('embedded-opentype'),
         url('../fonts/woff/IRAN-Rounded.woff') format('woff'),
         url('../fonts/ttf/IRAN Rounded.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRAN Rounded';
    src: url('../fonts/eot/IRAN-Rounded.eot');
    src: url('../fonts/eot/IRAN-Rounded.eot?#iefix') format('embedded-opentype'),
         url('../fonts/woff/IRAN-Rounded.woff') format('woff'),
         url('../fonts/ttf/IRAN Rounded.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-body: #f4f6fa;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.06);
    --radius: 16px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #dbeafe;
    --header-bg: rgba(255, 255, 255, 0.95);
    --shadow-header: 0 2px 24px rgba(0, 0, 0, 0.04);
    --font-fa: 'IRAN Rounded', 'Vazirmatn', 'IRANSans', 'Segoe UI', system-ui, sans-serif;
    --font-en: 'Poppins', 'Segoe UI', sans-serif;
    --max-width: 1320px;
}

[data-theme="dark"] {
    --bg-body: #080812;
    --bg-card: #12122a;
    --text-primary: #e8e8f0;
    --text-secondary: #b0b0c8;
    --text-muted: #666690;
    --border-color: #2a2a44;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(12, 12, 30, 0.95);
    --shadow-header: 0 2px 24px rgba(0, 0, 0, 0.3);
    --accent-light: #1a2a4a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-fa);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.8;
    padding-top: 80px;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

html[lang="en"] body {
    font-family: var(--font-en), var(--font-fa);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    height: 76px;
    display: flex;
    align-items: center;
    transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
    box-shadow: var(--shadow-header);
    font-family: var(--font-fa);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    max-width: var(--max-width);
    width: 100%;
}

.nav-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-fa);
}

html[lang="en"] .nav-brand {
    font-family: var(--font-en), var(--font-fa);
}

.nav-brand .highlight {
    color: var(--accent);
}

.nav-brand .lang-switch {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--border-color);
    padding: 0 10px;
    border-radius: 20px;
    margin-right: 8px;
    font-family: var(--font-en);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--font-fa);
}

html[lang="en"] .nav-links {
    font-family: var(--font-en), var(--font-fa);
}

html[dir="rtl"] .nav-links {
    margin-left: 20px;
    margin-right: 0;
}

html[dir="ltr"] .nav-links {
    margin-right: 20px;
    margin-left: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 4px 0;
    border-bottom: 2.5px solid transparent;
    position: relative;
    font-family: var(--font-fa);
}

html[lang="en"] .nav-links a {
    font-family: var(--font-en), var(--font-fa);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-fa);
}

.nav-actions button:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

.lang-toggle {
    display: flex;
    gap: 3px;
    background: var(--border-color);
    border-radius: 8px;
    padding: 3px;
}

.lang-toggle button {
    background: none;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-en);
}

.lang-toggle button.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.lang-toggle button:hover:not(.active) {
    color: var(--text-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.progress-bar {
    position: fixed;
    top: 76px;
    left: 0;
    width: 0;
    height: 3.5px;
    background: linear-gradient(90deg, var(--accent), #7c3aed, var(--accent));
    z-index: 999;
    transition: width 0.1s ease;
    border-radius: 0 2px 2px 0;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 3.5rem 4rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
    min-height: 70vh;
    margin-top: 20px;
}

/* ============================================
   PROFILE HEADER
   ============================================ */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.profile-image {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--bg-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, var(--accent-light), var(--border-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: var(--accent);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-info {
    flex: 1;
    min-width: 240px;
}

.profile-info h1 {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.profile-info h1 .highlight {
    color: var(--accent);
}

.profile-info .subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.profile-info .bio {
    color: var(--text-secondary);
    font-size: 0.98rem;
    max-width: 700px;
}

/* ============================================
   SOCIAL ICONS
   ============================================ */
.social-icons {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.8rem;
    flex-wrap: wrap;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.3rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.social-icons a:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 2.8rem 0 2.8rem 0;
}

/* ============================================
   SECTION LABEL
   ============================================ */
.section-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-label i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* ============================================
   POSTS CARDS
   ============================================ */
   .posts-grid-simple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.post-card-simple {
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card-simple:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.post-card-simple .post-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--accent-light), var(--border-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--accent);
    overflow: hidden;
    flex-shrink: 0;
}

.post-card-simple .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-card-simple .post-image span {
    font-size: 3.5rem;
}

.post-card-simple .post-body {
    padding: 1.2rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-simple .post-body .title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    line-height: 1.4;
}

.post-card-simple .post-body .title:hover {
    color: var(--accent);
}

.post-card-simple .post-body .excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.4rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-card-simple .post-body .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.post-card-simple .post-body .meta i {
    font-size: 0.7rem;
    margin-left: 3px;
}

.post-card-simple .post-body .tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.post-card-simple .post-body .tag {
    background: var(--border-color);
    padding: 0.05rem 0.9rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.post-card-simple .post-body .tag:hover {
    background: var(--accent);
    color: white;
}

/* ============================================
   NOTES CARDS
   ============================================ */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}

.note-card {
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.note-card .note-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--border-color), var(--bg-body));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--text-muted);
    overflow: hidden;
    flex-shrink: 0;
}

.note-card .note-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.note-card .note-image span {
    font-size: 3.5rem;
}

.note-card .note-body {
    padding: 1rem 1.4rem 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.note-card .note-body .title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
}

.note-card .note-body .title:hover {
    color: var(--accent);
}

.note-card .note-body .desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    flex: 1;
}

.note-card .note-body .note-footer {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.7rem;
}

.note-card .note-body .note-footer .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.note-card .note-body .note-footer .tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.note-card .note-body .note-footer .tag {
    background: var(--border-color);
    padding: 0.05rem 0.7rem;
    border-radius: 20px;
    font-size: 0.65rem;
    color: var(--text-secondary);
}
/* ============================================
   VIEW ALL LINK
   ============================================ */
.view-all {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.view-all:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 2.2rem;
    line-height: 2;
}

.footer .footer-brand {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
    .main-content {
        padding: 2.5rem 2rem;
        margin-top: 16px;
    }
    .posts-grid-simple {
        grid-template-columns: repeat(2, 1fr);
    }
    .profile-header {
        gap: 2rem;
    }
    .profile-image {
        width: 130px;
        height: 130px;
    }
    .profile-info h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 68px;
    }
    .navbar {
        height: 68px;
    }
    .progress-bar {
        top: 68px;
    }
    .container {
        padding: 0 14px;
    }
    .main-content {
        padding: 1.8rem 1.2rem;
        border-radius: var(--radius-sm);
        margin-top: 12px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        padding: 1.2rem 1.8rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
        gap: 0.6rem;
        align-items: flex-start;
        margin: 0 !important;
    }

    .nav-links.open {
        display: flex;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .profile-image {
        width: 110px;
        height: 110px;
    }

    .profile-info .bio {
        max-width: 100%;
    }

    .social-icons {
        justify-content: center;
    }

    .posts-grid-simple {
        grid-template-columns: 1fr;
    }

    .notes-grid {
        grid-template-columns: 1fr 1fr;
    }

    .lang-toggle button {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

@media (max-width: 500px) {
    .main-content {
        padding: 1.2rem 0.8rem;
        border-radius: 8px;
    }
    .profile-info h1 {
        font-size: 1.6rem;
    }
    .profile-image {
        width: 90px;
        height: 90px;
    }
    .notes-grid {
        grid-template-columns: 1fr;
    }
    .post-card-simple .post-image {
        height: 160px;
    }
    .footer {
        font-size: 0.8rem;
    }
}