
*, *::before, *::after {
  box-sizing: border-box;
}

html, body { 
  height: 100%; 
} 
    :root {
      --neon-cyan: #00f5ff;
      --neon-magenta: #ff00ff;
      --neon-purple: #8b5cf6;
      --dark-bg: #0a0a0f;
      --glass-bg: rgba(255, 255, 255, 0.05);
    }
    body {
  background: var(--dark-bg);
  font-family: 'Rajdhani', sans-serif;
  margin: 0;
}

     /* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--neon-cyan) transparent;
}

/* Chrome / Edge / Safari */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--neon-cyan);
  border-radius: 10px;
  border: 2px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--neon-magenta);
}
    
    .chess-pattern {
  background-color: #0f172a;
  background-image: 
    linear-gradient(45deg, #1e293b 25%, transparent 25%, transparent 75%, #1e293b 75%),
    linear-gradient(45deg, #1e293b 25%, transparent 25%, transparent 75%, #1e293b 75%);
  background-size: 60px 60px;
  background-position: 0 0, 30px 30px;
}
    
    .font-orbitron { font-family: 'Orbitron', sans-serif; }
    .font-rajdhani { font-family: 'Rajdhani', sans-serif; }
    
  .glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
    
    .glass-strong {
      background: rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(30px);
      border: 1px solid rgba(255, 255, 255, 0.15);
    }

    .neon-text {
      text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
    }
    
    .neon-text-magenta {
      text-shadow: 0 0 10px var(--neon-magenta), 0 0 20px var(--neon-magenta);
    }
    
    .neon-border {
      box-shadow: 0 0 15px rgba(0, 245, 255, 0.3), inset 0 0 15px rgba(0, 245, 255, 0.1);
    }
    
    .neon-glow {
      box-shadow: 0 0 30px rgba(0, 245, 255, 0.4), 0 0 60px rgba(0, 245, 255, 0.2);
    }
    
    @keyframes pulse-glow {
      0%, 100% { opacity: 1; filter: brightness(1); }
      50% { opacity: 0.8; filter: brightness(1.2); }
    }
    
    @keyframes float {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-10px); }
    }
    
    @keyframes typing {
      from { width: 0; }
      to { width: 100%; }
    }
    
    @keyframes blink {
      0%, 50% { border-color: var(--neon-cyan); }
      51%, 100% { border-color: transparent; }
    }
    
    @keyframes scan-line {
      0% { top: 0%; }
      100% { top: 100%; }
    }
    
    @keyframes gradient-shift {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }


    /* کارتها که بعدا اضافه کردم*/

    .grid-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 12rem;        /* ارتفاع ثابت کارت */
  padding: 0.75rem;
  border-radius: 1rem;
  background: linear-gradient(to bottom, rgba(139,92,246,0.2), rgba(139,92,246,0.05));
  transition: transform 0.3s ease;
  cursor: pointer;
  overflow: hidden;     /* تصویر روی hover از کارت بیرون نزنه */
}
/* کارت اول تا سوم */
.book-card:nth-child(-n+3) img {
  height: 11rem; /* ارتفاع بلندتر مشابه کارت آخر */
  object-fit: cover;
  border-radius: 0.5rem;
}

/* کارت آخر بدون تغییر */
.book-card:last-child img {
  height: 11rem; /* همون ارتفاع اصلی خودش */
}

/* اول همه عکس‌ها رو بلند کن */
.book-card img {
  width: 100%;
  height: 11rem;   /* همه بلندتر شدن */
  object-fit: cover;
  border-radius: 0.5rem;
  transition: transform 0.3s ease;
}
/*  عکس چهارم کمی بالاتر */
.book-card:nth-child(4) {
  transform: translateY(-25px);
}

.book-card:nth-child(4):hover {
  transform: translateY(-25px) scale(1.05);
}

.flex-left span {
  margin-left: -0.5rem; /* همه اسپن‌ها کمی به چپ حرکت می‌کنند */
}

/* hover */
.book-card:hover img {
  transform: scale(1.1);
}
/* لایت‌باکس */
#lightbox.hidden {
  display: none;
}
#lightbox {
  display: flex;
}
#lightbox img {
  transition: transform 0.3s ease;
}
    
    .animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
    .animate-float { animation: float 3s ease-in-out infinite; }
    
    .grid-background {
      background-image: 
        linear-gradient(rgba(0, 245, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.03) 1px, transparent 1px);
      background-size: 50px 50px;
    }
    
    .widget-card {
      transition: transform 0.4s, box-shadow 0.4s;
    }
    
    .widget-card:hover {
      transform: translateY(-5px) scale(1.02);
      box-shadow: 0 0 40px rgba(0, 245, 255, 0.3);
    }
    
    .skill-bar {
      background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
      box-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
    }
    
    .code-line {
      animation: typing 2s steps(40) forwards;
      overflow: hidden;
      white-space: nowrap;
      max-width: fit-content;
    }
    
    .cursor {
      border-right: 2px solid var(--neon-cyan);
      animation: blink 1s infinite;
    }
    
    .hex-pattern {
      background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 15V45L30 60L0 45V15L30 0Z' fill='none' stroke='rgba(0,245,255,0.05)' stroke-width='1'/%3E%3C/svg%3E");
    }
    
    .project-card {
      position: relative;
      overflow: hidden;
    }
    
    .project-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
      animation: scan-line 3s linear infinite;
    }
    
    .gradient-text {
      background: linear-gradient(135deg, #00f5ff, #ff00ff, #8b5cf6);
      background-size: 200% 200%;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      animation: gradient-shift 3s ease infinite;
    }
    
    .btn-neon {
      position: relative;
      overflow: hidden;
      transition: background 0.3s ease, transform 0.3s ease;
    }
    
    .btn-neon::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
      transition: left 0.5s ease;
    }

    .btn-neon:hover::before {
      left: 100%;
    }
    
    .section-divider {
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-magenta), transparent);
    }
     
    /* mini Apps*/

    
    .modal-overlay {
      backdrop-filter: blur(8px);
      animation: fadeIn 0.3s ease;
    }
    .modal-content {
      animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    @keyframes slideUp {
      from { opacity: 0; transform: translateY(30px) scale(0.95); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .app-card { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
            box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

    .app-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
    .input-field {
      transition: transform 0.2s ease, border-color 0.2s ease;
      background: rgba(255, 255, 255, 0.05) !important;
      border: 1px solid rgba(255, 255, 255, 0.2) !important;
      color: white !important;
    }
    .input-field:focus {
      transform: scale(1.01);
      border-color: rgba(0, 245, 255, 0.5) !important;
    }
    .btn-primary {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
       transition: transform 0.3s ease, box-shadow 0.3s ease; 
    }
    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 30px -10px rgba(102, 126, 234, 0.5);
    }
    .btn-secondary { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
    .btn-success { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
    .btn-warning { background: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%); }
    .counter-btn {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      font-weight: bold;
      transition: all 0.2s ease;
    }
    .counter-btn:hover { transform: scale(1.1); }
    .status-badge {
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 500;
    }


