/* ==========================================
   responsive.css — Responsive Styles
   هماهنگ با style.css جدید
   ========================================== */

/* ==========================================
   Tablet / Small Laptop
   ========================================== */
@media (max-width: 900px) {
  :root {
    --nav-height: 64px;
    --page-padding: 18px;
  }

  .navbar {
    top: 10px;
    width: calc(100% - 20px);
    height: var(--nav-height);
  }

  .desktop-nav,
  .nav-links {
    display: none;
  }

  .hamburger {
    display: inline-flex;
  }

  .mobile-menu {
    display: block;
    top: calc(var(--nav-height) + 24px);
    left: 10px;
    right: 10px;
  }

  .main-content {
    padding-top: calc(var(--nav-height) + 24px);
  }

  .container {
    padding: 44px var(--page-padding) 64px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .resume-header-inner {
    flex-direction: column;
  }

  .download-btn {
    width: 100%;
  }

  .post-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .photo-masonry {
    columns: 2;
    column-gap: 10px;
  }

  .photo-item {
    margin-bottom: 10px;
  }

  .footer-inner {
    flex-direction: column-reverse;
    text-align: center;
  }
}

/* ==========================================
   Mobile
   ========================================== */
@media (max-width: 560px) {
  :root {
    --page-padding: 16px;
  }

  .navbar {
    top: 10px;
    width: calc(100% - 20px);
  }

  .nav-container {
    padding: 0 10px;
    gap: 8px;
  }

  .logo-text {
    font-size: 16px;
  }

  .logo-dot {
    font-size: 22px;
  }

  .glass-action {
    width: 38px;
    height: 38px;
  }

  .hamburger span {
    width: 18px;
  }

  .mobile-menu {
    left: 10px;
    right: 10px;
    padding: 10px;
  }

  .mobile-nav-link {
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  .container {
    padding-top: 36px;
    padding-bottom: 64px;
  }

  .page-title {
    font-size: clamp(1.65rem, 8vw, 2rem);
  }

  .page-description {
    font-size: 0.9rem;
  }

  .hero-avatar img {
    width: 150px;
    height: 150px;
  }

  .empty-state {
    padding: 42px 14px;
  }

  .card {
    padding: 18px;
  }

  .photo-masonry {
    columns: 1;
    column-gap: 0;
  }

  .photo-item {
    margin-bottom: 12px;
  }

  .timeline {
    padding-inline-start: 18px;
  }

  .timeline-item::before {
    inset-inline-start: -23px;
    width: 8px;
    height: 8px;
  }

  .post-link {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================
   Very Small Mobile
   ========================================== */
@media (max-width: 380px) {
  :root {
    --page-padding: 14px;
  }

  .nav-actions {
    gap: 5px;
  }

  .glass-action {
    width: 36px;
    height: 36px;
  }

  .logo-text {
    font-size: 15px;
  }

  .lang-toggle {
    font-size: 11px;
  }

  .page-title {
    font-size: clamp(1.5rem, 9vw, 1.85rem);
  }

  .hero-avatar img {
    width: 136px;
    height: 136px;
  }

  .photo-masonry {
    columns: 1;
  }
}

/* ==========================================
   Large Screens
   ========================================== */
@media (min-width: 1200px) {
  :root {
    --max-width: 800px;
  }

  .photo-masonry {
    columns: 3;
  }
}

/* ==========================================
   Background Optimization For Mobile
   ========================================== */
@media (max-width: 768px) {
  body::before {
    background-size:
      150% 150%,
      150% 150%,
      140% 140%;
    opacity: 0.75;
  }

  body::after {
    background-size:
      56px 56px,
      52px 52px,
      52px 52px;
    opacity: 0.25;
  }
}

/* ==========================================
   Cursor - Hidden On Touch / Mobile
   ========================================== */
@media (pointer: coarse), (max-width: 768px) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  body {
    cursor: auto !important;
  }
}

/* ==========================================
   Reduced Motion
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

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

  body::before,
  body::after,
  .loader-dot,
  .heart,
  .animate-in {
    animation: none !important;
  }

  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  body {
    cursor: auto !important;
  }
}

/* ==========================================
   Print
   ========================================== */
@media print {
  .navbar,
  .mobile-menu,
  .footer,
  .page-loader,
  .download-btn,
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }

  body::before,
  body::after {
    display: none !important;
  }

  .main-content {
    padding-top: 0 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  .glass-card,
  .card,
  .timeline-item {
    break-inside: avoid;
  }
}
