  /*
    Theme Name: My Custom Theme
    Author: Your Name
    Text Domain: portfolio
    */
  /* ═══════════════════════════════════════════
   FONTS & VARIABLES
═══════════════════════════════════════════ */
  /* اضافه کردن فونت پرطرفدار و استاندارد ایران یکان (Yekan) */
  @font-face {
    font-family: 'Yekan';
    src: url('../fonts/B-NAZANIN.TTF') format('TFF');
    font-weight: normal;
    font-style: normal;
  }


  :root {
    --primary: #6C63FF;
    --primary-light: #8B85FF;
    --primary-dark: #4B44CC;
    --accent: #FF6584;
    --bg: #0A0A14;
    --bg-card: rgba(22, 22, 42, 0.65);
    --bg-card-hover: rgba(30, 30, 53, 0.85);
    --border: rgba(108, 99, 255, 0.15);
    --border-hover: rgba(108, 99, 255, 0.35);
    --text: #F3F3F7;
    --text-muted: #A0A0C0;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    --radius: 18px;
    --radius-sm: 10px;
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-fa: 'YekanBakh', 'Yekan', 'Vazirmatn', sans-serif;
    --font-en: 'Inter', sans-serif;
  }

  /* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-behavior: smooth;
    margin: 0;

  }

  body {

    background: var(--bg);
    background-image:
      radial-gradient(circle at 10% 20%, rgba(108, 99, 255, 0.05) 0%, transparent 40%),
      radial-gradient(circle at 90% 80%, rgba(255, 101, 132, 0.04) 0%, transparent 40%);
    color: var(--text);
    font-family: var(--font-fa);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

  }

  body.en {
    font-family: var(--font-en);
    direction: ltr;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  body.fa {
    font-family: var(--font-fa);
    direction: rtl;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  ul {
    list-style: none;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  .container {
    max-width: 1280px;
    padding: 0 32px;
  }

  /* ═══════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════ */
  ::-webkit-scrollbar {
    width: 8px;
  }

  ::-webkit-scrollbar-track {
    background: var(--bg);
  }

  ::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--accent));
    border-radius: 99px;
  }

  /* ═══════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════ */
  .navbar {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1200px, calc(100% - 30px));
    z-index: 1000;

    background: rgba(10, 10, 20, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    transition: all .3s ease;
  }

  .navbar::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);

    width: 70%;
    height: 1px;

    background: linear-gradient(90deg,
        transparent,
        var(--primary),
        transparent);
  }

  .navbar.scrolled {
    background: rgba(10, 10, 20, 0.9);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
    border-color: rgba(108, 99, 255, .2);
  }

  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-links ul {
    display: flex;
    gap: 20px;
    align-items: center;
  }

  .hamburger {
    display: none;
  }

  .logo img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    display: flex;
    align-items: center;
  }

  .logo {

    background: linear-gradient(135deg, #fff, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    width: auto;
    height: auto;
  }

  #menu-portfolio_menus {
    display: flex;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-inline-start: auto;
    width: 100%;

  }

  .nav-links a {
    padding: 8px 18px;
    border-radius: 99px;
    font-size: .95rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--text);
    background: rgba(108, 99, 255, 0.1);
  }

  .lang-toggle {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--primary-light);
    padding: 8px 20px;
    border-radius: 99px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    transition: var(--transition);
    flex-shrink: 0;
  }

  .lang-toggle:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
  }

  .hamburger {
    display: none;
    width: 45px;
    height: 45px;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    z-index: 1002;
  }

  .hamburger span {
    width: 22px;
    height: 2px;
    background: #fff;
    display: block;
    margin: 3px 0;
    transition: .3s;
  }

  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(4px);

    opacity: 0;
    visibility: hidden;

    transition: .3s;
    z-index: 1000;
  }

  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
  .hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1200px;
    margin: auto;
  }

  .hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .2;
  }

  .shape-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -100px;
  }

  .shape-2 {
    width: 450px;
    height: 450px;
    background: var(--accent);
    bottom: -150px;
    left: -80px;
  }

  .shape-3 {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    top: 30%;
    left: 35%;
  }

  .hero-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
  }

  .hero-greeting {
    font-size: 1.1rem;
    color: var(--primary-light);
    letter-spacing: .05em;
    font-weight: 500;
    margin-bottom: 12px;
  }

  .hero-name {
    font-size: clamp(2.8rem, 7vw, 4.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #fff 40%, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero-title {
    font-size: clamp(1.1rem, 2.5vw, 1.45rem);
    color: var(--text);
    opacity: 0.9;
    font-weight: 500;
    margin-bottom: 24px;
  }

  .hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 40px;
  }

  .hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }

  .hero .avatar-container img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 30px;

    border: 1px solid rgba(255, 255, 255, .1);

    background: linear-gradient(135deg,
        rgba(108, 99, 255, .3),
        rgba(255, 101, 132, .3));

    box-shadow:
      0 0 60px rgba(108, 99, 255, .25),
      0 20px 60px rgba(0, 0, 0, .4);
  }

  .btn {
    padding: 14px 32px;
    border-radius: 99px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
  }

  .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 6px 24px rgba(108, 99, 255, .35);
  }

  .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(108, 99, 255, .5);
  }

  .btn-outline {
    border: 1.5px solid var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(5px);
  }

  .btn-outline:hover {
    background: rgba(108, 99, 255, 0.1);
    border-color: var(--primary-light);
    transform: translateY(-3px);
  }

  .scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
  }

  .scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: 99px;
    position: relative;
  }

  .scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 99px;
    animation: scrollDot 1.8s infinite;
  }

  @keyframes scrollDot {
    0% {
      opacity: 1;
      top: 6px;
    }

    100% {
      opacity: 0;
      top: 24px;
    }
  }

  /* ═══════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════ */
  .section {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 28px;
    padding: 50px;
    backdrop-filter: blur(10px);
    align-content: center;
  }

  .section-title {
    font-size: clamp(2rem, 5vw, 2.7rem);
    font-weight: 800;
    margin-bottom: 70px;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #fff, #b8b8d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    right: 0;
    width: 60px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 99px;
  }

  .en .section-title::after {
    right: auto;
    left: 0;
  }

  /* ═══════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════ */
  .about {
    background: linear-gradient(180deg, rgba(20, 20, 25, .9), rgba(15, 15, 20, .95));
    backdrop-filter: blur(12px);
  }

  .about-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 70px;
    align-items: center;
  }

  .about-text p {
    color: var(--text-muted);
    margin-bottom: 22px;
    font-size: 1.12rem;
    line-height: 1.9;
  }

  .about-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 38px;
  }

  .badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: .9rem;
    color: var(--text-muted);
    transition: .35s;
  }

  .badge:hover {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.08);
    color: var(--text);
    transform: translateY(-3px);
  }

  .badge i {
    color: var(--primary-light);
  }

  .about-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 34px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 42px;
    border-radius: 26px;
    transition: .4s;
  }

  .about-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .35);
  }

  .about-links {
    display: flex;
    gap: 18px;
  }

  .icon-link {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: .35s;
  }

  .icon-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(108, 99, 255, .35);
  }


  /* ═══════════════════════════════════════════
   TIMELINE (EXPERIENCE)
═══════════════════════════════════════════ */
  .experience {
    background: var(--bg);
  }

  .avatar-container-image {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 60px;
    align-items: start;
  }

  .timeline {
    position: relative;
    padding-inline-start: 36px;
  }

  .timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    right: 6px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent), transparent);
  }

  .en .timeline::before {
    right: auto;
    left: 6px;
  }

  .timeline-item {
    position: relative;
    margin-bottom: 45px;
  }

  .timeline-dot {
    position: absolute;
    top: 24px;
    right: -42px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.25);
    z-index: 2;
  }

  .en .timeline-dot {
    right: auto;
    left: -42px;
  }

  .timeline-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    transition: var(--transition);
  }

  .timeline-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(-6px);
    box-shadow: var(--shadow);
  }

  .en .timeline-card:hover {
    transform: translateX(6px);
  }

  .timeline-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
  }

  .timeline-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
  }

  .timeline-company {
    background: rgba(108, 99, 255, .12);
    border: 1px solid rgba(108, 99, 255, .2);
    color: var(--primary-light);
    padding: 4px 14px;
    border-radius: 99px;
    font-size: .85rem;
    font-weight: 600;
  }

  .timeline-duration {
    margin-inline-start: auto;
    font-size: .85rem;
    color: var(--text-muted);
    font-weight: 500;
  }

  .timeline-list {
    margin-bottom: 20px;
  }

  .timeline-list li {
    font-size: .98rem;
    color: var(--text-muted);
    padding: 6px 0;
    padding-inline-start: 20px;
    position: relative;
  }

  .timeline-list li::before {
    content: '✦';
    position: absolute;
    right: 0;
    color: var(--primary-light);
    font-size: 0.8rem;
  }

  .en .timeline-list li::before {
    right: auto;
    left: 0;
  }

  .timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
  }

  .timeline-tags span {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 99px;
    font-size: .8rem;
    color: var(--text-muted);
    font-family: var(--font-en);
  }

  .timeline-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }

  .timeline-links a {
    font-size: .88rem;
    color: var(--primary-light);
    font-weight: 500;
    transition: var(--transition);
  }

  .timeline-links a:hover {
    color: var(--accent);
  }

  .timeline-links i {
    font-size: .8rem;
    margin-inline-start: 6px;
  }

  /* ═══════════════════════════════════════════
   SKILLS
═══════════════════════════════════════════ */
  .skills {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
  }

  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
  }

  .skill-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
  }

  .skill-group:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-6px);
    box-shadow: var(--shadow);
  }

  .skill-group-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .skill-group-title i {
    font-size: 1.15rem;
  }

  .skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .skill-pills span {
    background: rgba(108, 99, 255, 0.06);
    border: 1px solid rgba(108, 99, 255, .2);
    color: var(--text);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: .88rem;
    font-family: var(--font-en);
    transition: var(--transition);
  }

  .skill-pills span:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: scale(1.05);
  }

  /* ═══════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════ */
  .contact {
    background: var(--bg);
  }

  .contact-sub {
    color: var(--text-muted);
    margin-top: -40px;
    margin-bottom: 50px;
    font-size: 1.1rem;
  }

  .contact-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
  }

  .contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 30px;
    flex: 1 1 280px;
    transition: var(--transition);
    color: var(--text-muted);
    font-size: 1rem;
  }

  .contact-card i {
    font-size: 1.6rem;
    color: var(--primary-light);
    flex-shrink: 0;
  }

  .contact-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    transform: translateY(-6px);
    box-shadow: var(--shadow);
  }

  /* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
  .footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    text-align: center;
    /* padding: 40px; */
    /* font-size: .95rem; */
    color: var(--text-muted);
    margin-top: auto;
  }

  /* .footer .avatar-container {
  margin-bottom: 5px;
} */

  .footer .avatar-container img {
    width: 150px;
    height: 150px;
  }

  /* ═══════════════════════════════════════════
   AVATAR CONTAINERS & IMAGES
═══════════════════════════════════════════ */
  .avatar-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .avatar-container img {
    width: 100%;
    padding-bottom: 10px;
    max-width: 320px;
    height: auto;
    border-radius: 30px;
    filter: drop-shadow(0 15px 30px rgba(108, 99, 255, 0.15));
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.6s ease;
  }

  .avatar-container img:hover {
    transform: scale(1.04) rotate(-1deg);
    filter: drop-shadow(0 20px 40px rgba(108, 99, 255, 0.3));
  }

  #aboutimg {
    width: 200px;
  }

  /* ═══════════════════════════════════════════
   RESPONSIVE LAYOUTS
═══════════════════════════════════════════ */
  @media (max-width: 992px) {
    .about-grid {
      grid-template-columns: 1fr;
      gap: 40px;
    }

    .about-card {
      max-width: 500px;
      margin: 0 auto;
      width: 100%;
    }

    .avatar-container-image {
      grid-template-columns: 1fr;
      gap: 40px;
    }

    .avatar-container-image .avatar-container img {
      max-width: 260px;
    }
  }




  @media (max-width: 480px) {
    .section {
      padding: 80px 0;
    }

    .contact-card {
      flex: 1 1 100%;
    }

    .btn {
      width: 100%;
    }
  }

  /* ═══════════════════════════════════════════
   BLOG PAGES
═══════════════════════════════════════════ */

  .nav-write-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(108, 99, 255, 0.12);
    border: 1px solid var(--border);
    color: var(--primary-light);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
  }

  .nav-write-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
  }

  .blog-page,
  .write-page {
    min-height: 100vh;
    padding-top: 84px;
  }

  .blog-hero,
  .write-hero {
    position: relative;
    overflow: hidden;
    padding: 110px 0 80px;
    background:
      radial-gradient(circle at 20% 10%, rgba(108, 99, 255, 0.18), transparent 35%),
      radial-gradient(circle at 80% 70%, rgba(255, 101, 132, 0.12), transparent 35%),
      var(--bg);
  }

  .blog-hero::after,
  .write-hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
  }

  .blog-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-light);
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 99px;
    font-family: var(--font-en);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
  }

  .blog-hero h1,
  .write-hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.25;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .blog-hero p,
  .write-hero p {
    max-width: 700px;
    color: var(--text-muted);
    font-size: 1.08rem;
  }

  .blog-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
  }

  .blog-list-section {
    background: var(--bg-card);
    
  }

  .blog-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
  }

  .blog-section-head .section-title {
    margin-bottom: 22px;
  }

  .blog-section-head p {
    color: var(--text-muted);
  }

  .blog-search {
    position: relative;
    width: min(100%, 340px);
    flex-shrink: 0;
  }

  .blog-search i {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: var(--primary-light);
  }

  .blog-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 99px;
    padding: 14px 48px 14px 18px;
    font-family: var(--font-fa);
    outline: none;
    transition: var(--transition);
  }

  .blog-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.12);
  }

/* GRID */
.blog-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
    gap:30px;
}

/* CARD */
.blog-card{
    display:flex;
    flex-direction:column;
    background:#111;
    border-radius:16px;
    overflow:hidden;
    transition:0.3s ease;
    height:100%;
}

.blog-card:hover{
    transform:translateY(-6px);
}

/* IMAGE */
.blog-image{
    aspect-ratio:16/9;
    overflow:hidden;
}

.blog-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transition:0.4s;
}

.blog-card:hover .blog-image img{
    transform:scale(1.05);
}

/* CONTENT */
.blog-content{
    display:flex;
    flex-direction:column;
    padding:20px;
    flex:1;
}

/* TITLE (ارتفاع ثابت با clamp) */
.blog-content h3{
    font-size:18px;
    margin:0 0 10px;
    line-height:1.4;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    min-height:2.8em; /* ثابت نگه داشتن ارتفاع */
}

/* DATE */
.blog-date{
    font-size:13px;
    opacity:0.6;
    margin-bottom:12px;
}

/* EXCERPT */
.blog-content p{
    font-size:14px;
    line-height:1.7;
    margin-bottom:20px;

    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;

    flex-grow:1; /* هل دادن دکمه به پایین */
}

/* BUTTON */
.blog-card .btn{
    margin-top:auto;
}


  .read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--primary-light);
    font-family: var(--font-fa);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
  }

  .read-more-btn:hover {
    color: var(--accent);
    gap: 12px;
  }

  .empty-blog {
    /* display: none; */
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, .025);
    border: 1px dashed var(--border);
    border-radius: 24px;
    padding: 60px 24px;
  }

  .empty-blog i {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 18px;
  }

  .empty-blog h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .empty-blog p {
    color: var(--text-muted);
    margin-bottom: 24px;
  }

  /* ═══════════════════════════════════════════
   WRITE ARTICLE FORM
═══════════════════════════════════════════ */

  .write-section {
    background: var(--bg-card);
  }

  .article-form {
    max-width: 850px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 34px;
    box-shadow: var(--shadow);
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .form-group {
    margin-bottom: 22px;
  }

  .form-group label {
    display: block;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 10px;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 16px;
    padding: 14px 16px;
    font-family: var(--font-fa);
    font-size: 0.96rem;
    outline: none;
    transition: var(--transition);
  }

  .form-group textarea {
    resize: vertical;
    line-height: 1.9;
  }

  .form-group select {
    cursor: pointer;
  }

  .form-group select option {
    background: var(--bg-card2);
    color: var(--text);
  }

  .form-group input:focus,
  .form-group textarea:focus,
  .form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.12);
  }

  .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
  }

  .form-note {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 22px;
  }

  /* ═══════════════════════════════════════════
   BLOG RESPONSIVE
═══════════════════════════════════════════ */

  @media (max-width: 768px) {
    .nav-write-btn {
      display: none;
    }

    .blog-hero,
    .write-hero {
      padding: 90px 0 60px;
      text-align: center;
    }

    .blog-hero p,
    .write-hero p {
      margin: 0 auto;
    }

    .blog-hero-actions {
      justify-content: center;
    }

    .blog-section-head {
      flex-direction: column;
    }

    .blog-search {
      width: 100%;
    }

    .form-row {
      grid-template-columns: 1fr;
      gap: 0;
    }

    .article-form {
      padding: 24px;
    }
  }

  @media (max-width: 480px) {
    .blog-grid {
      grid-template-columns: 1fr;
    }

    .blog-card {
      padding: 24px;
    }

    .blog-card-footer {
      flex-direction: column;
      align-items: flex-start;
    }

    .form-actions .btn {
      width: 100%;
    }
  }

  .single-post-section {
    padding: 120px 0;
  }

  .single-post {
    max-width: 900px;
    margin: auto;
  }

  .post-thumbnail img {
    width: 100%;
    border-radius: 20px;
    margin-bottom: 30px;
  }

  .post-title {
    font-size: 42px;
    margin-bottom: 20px;
  }

  .post-meta {
    color: #888;
    margin-bottom: 30px;
  }

  .post-content {
    line-height: 2.2;
    font-size: 18px;
  }

  .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
  }

  /* ═══════════════════════════════════════════
  Animation
═══════════════════════════════════════════ */
  .timeline-card,
  .skill-group,
  .blog-card,
  .contact-card,
  .about-card {
    transition:
      transform .35s ease,
      border-color .35s ease,
      box-shadow .35s ease;
  }

  .timeline-card:hover,
  .skill-group:hover,
  .blog-card:hover,
  .contact-card:hover,
  .about-card:hover {
    transform: translateY(-8px);
    box-shadow:
      0 15px 40px rgba(0, 0, 0, .35);
  }

  .hero,
  .about,
  .experience,
  .skills,
  .contact {
    overflow-x: hidden;
  }

  @media (max-width: 768px) {
    .hero {
      grid-template-columns: 1fr;
      text-align: center;
      gap: 30px;
      padding-bottom: 10px;
    }

    /* تنظیم محل و سایز عکس پروفایل در موبایل (در صورت نیاز) */
    .avatar-container {
      margin-bottom: 30px;
      display: flex;
      justify-content: center;
    }

    #hero-img {
      max-width: 200px;
      /* سایز عکس در موبایل */
      height: auto;
    }

    .hero-content {
      max-width: 100%;
      margin: 0 auto;
    }

    .hero-cta {
      justify-content: center;
      flex-direction: column;
      /* دکمه‌ها زیر هم قرار می‌گیرند */
      gap: 12px;
    }

    .btn {
      width: 100%;
      /* دکمه‌ها تمام عرض می‌شوند */
      max-width: 300px;
      margin: 0 auto;
    }

    /* کوچکتر کردن اشکال پس‌زمینه برای جلوگیری از سنگین شدن گرافیک در موبایل */
    .shape-1 {
      width: 300px;
      height: 300px;
      top: -100px;
      right: -50px;
    }

    .shape-2 {
      width: 250px;
      height: 250px;
      bottom: -50px;
      left: -40px;
    }

    .shape-3 {
      width: 150px;
      height: 150px;
    }

    .hamburger {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      width: 40px;
      height: 40px;
      background: transparent;
      border: none;
      cursor: pointer;
      z-index: 1001;
    }

    .hamburger span {
      width: 24px;
      height: 2px;
      background: #fff;
      transition: all .3s ease;
    }

    .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      width: 280px;
      height: 100vh;
      background: #111827;
      padding-top: 100px;
      transition: right .3s ease;
      z-index: 1000;
    }

    .nav-links.active {
      right: 0;
    }

    .nav-links ul {
      display: flex;
      flex-direction: column;
      gap: 20px;
      padding: 0 30px;
      margin: 0;
      list-style: none;
    }

    .nav-links li {
      width: 100%;
      text-align: center;
    }

    .nav-links a {
      color: #fff;
      text-decoration: none;
      font-size: 18px;
      display: block;
      padding: 10px 0;
    }

    .lang-toggle {
      margin-top: 20px;
      align-self: flex-start;
    }

    .menu-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .5);
      opacity: 0;
      visibility: hidden;
      transition: .3s;
      z-index: 999;
    }

    .menu-overlay.active {
      opacity: 1;
      visibility: visible;
    }

    /* تبدیل همبرگری به ضربدر */
    .hamburger.active span:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
      opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
      transform: rotate(-45deg) translate(5px, -5px);
    }
  }

  /* تنظیمات بیشتر برای گوشی‌های خیلی کوچک */
  @media (max-width: 480px) {
    .hero-name {
      margin-bottom: 12px;
    }

    .hero-sub {
      margin-bottom: 30px;
      font-size: 0.95rem;
    }
  }