/* Custom Responsive Styles for Kamruzzman Shuvo Portfolio */

/* Prevent horizontal scroll issues on mobile */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
}

/* Grid background texture */
.grid-overlay {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

@media (min-width: 640px) {
  .grid-overlay {
    background-size: 40px 40px;
  }
}

.dark .grid-overlay {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

.dark ::-webkit-scrollbar-track {
  background: #030712;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
  border: 2px solid #f8fafc;
}

.dark ::-webkit-scrollbar-thumb {
  background: #1e293b;
  border: 2px solid #030712;
}

::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

/* Skill Tags - Responsive */
.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border-radius: 0.5rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  line-height: 1.2;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  transition: all 0.2s ease-in-out;
  word-break: break-word;
}

@media (min-width: 640px) {
  .skill-tag {
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
  }
}

.dark .skill-tag {
  background-color: rgba(15, 23, 42, 0.85);
  border-color: rgba(51, 65, 85, 0.7);
  color: #cbd5e1;
}

.skill-tag:hover {
  border-color: #6366f1;
  color: #4338ca;
  background-color: rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.dark .skill-tag:hover {
  color: #ffffff;
  background-color: rgba(99, 102, 241, 0.15);
}

/* Terminal Tab States */
.terminal-tab {
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.terminal-tab.active {
  background-color: #0b0f19;
  color: #38bdf8;
  border-top: 2px solid #38bdf8;
}

/* Mobile responsive code scrolling */
.terminal-code {
  word-break: break-word;
}

@media (max-width: 640px) {
  .terminal-code pre, .terminal-code p {
    font-size: 0.75rem;
    line-height: 1.5;
  }
}

/* Glassmorphism Card Hover Border Glow */
.glass-glow-card {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass-glow-card {
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid rgba(30, 41, 59, 0.8);
}

.glass-glow-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.2);
}

/* Toast Notification Animation */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-item {
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: calc(100vw - 2rem);
}

/* Print Stylesheet for Resume/CV export */
@media print {
  body {
    background-color: #ffffff !important;
    color: #0f172a !important;
  }

  header, footer, #toast-container, button, .no-print {
    display: none !important;
  }

  .grid-overlay, [class*="animate-blob"], [class*="blur-"] {
    display: none !important;
  }

  section {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    border: none !important;
    background: none !important;
    break-inside: avoid;
  }

  h1, h2, h3, strong {
    color: #0f172a !important;
    text-shadow: none !important;
    background: none !important;
    -webkit-text-fill-color: #0f172a !important;
  }

  p, span, div {
    color: #334155 !important;
  }

  .skill-tag {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
  }

  .rounded-3xl, .rounded-2xl {
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }
}
