/* Custom stylesheet for MD Rasel Hossen Portfolio */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px; /* Offset for sticky navigation */
}

/* Custom font definition fallback */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Custom Scrollbar - Luxury Obsidian Dark Mode */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f4f4f5;
}
.dark ::-webkit-scrollbar-track {
  background: #09090b;
}
::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a1a1aa;
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* Glow effects and gradients */
.glow-emerald {
  box-shadow: 0 0 35px -5px rgba(16, 185, 129, 0.35);
}

.glow-teal {
  box-shadow: 0 0 35px -5px rgba(20, 184, 166, 0.35);
}

/* Interactive Animated Beam Card: Side Border Color Sweep on Hover & Click */
.interactive-beam-card {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  overflow: hidden;
}

.interactive-beam-card::before,
.interactive-beam-card::after {
  content: '';
  position: absolute;
  width: 2.5px;
  height: 0%;
  bottom: 0;
  opacity: 0;
  transition: height 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 20;
  pointer-events: none;
}

.interactive-beam-card::before {
  left: 0;
  background: linear-gradient(to top, transparent, #10b981, #14b8a6);
  box-shadow: 0 0 12px 2px rgba(16, 185, 129, 0.7);
}

.interactive-beam-card::after {
  right: 0;
  background: linear-gradient(to top, transparent, #06b6d4, #38bdf8);
  box-shadow: 0 0 12px 2px rgba(6, 182, 212, 0.7);
}

.interactive-beam-card:hover,
.interactive-beam-card:active,
.interactive-beam-card.is-active {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
}

.dark .interactive-beam-card:hover,
.dark .interactive-beam-card:active,
.dark .interactive-beam-card.is-active {
  box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.85), 0 0 25px -5px rgba(16, 185, 129, 0.2);
  border-color: #3f3f46;
}

.interactive-beam-card:hover::before,
.interactive-beam-card:hover::after,
.interactive-beam-card:active::before,
.interactive-beam-card:active::after,
.interactive-beam-card.is-active::before,
.interactive-beam-card.is-active::after {
  height: 100%;
  opacity: 1;
}

/* Hero Portrait Board Side Shadow & Elevation */
.hero-board-shadow {
  box-shadow: 
    0 16px 40px -12px rgba(9, 9, 11, 0.12),
    -10px 0 25px -8px rgba(16, 185, 129, 0.12),
    10px 0 25px -8px rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(228, 228, 231, 0.9);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .hero-board-shadow {
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.85),
    -14px 0 35px -10px rgba(16, 185, 129, 0.22),
    14px 0 35px -10px rgba(20, 184, 166, 0.22),
    0 0 25px 1px rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(39, 39, 42, 0.85);
}

.hero-board-shadow:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 30px 70px -15px rgba(0, 0, 0, 0.9),
    -18px 0 40px -8px rgba(16, 185, 129, 0.28),
    18px 0 40px -8px rgba(20, 184, 166, 0.28);
}

/* Typewriter Cursor */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.typewriter-cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 0.9s infinite;
  color: #10b981;
}

/* Floating Dock Animation */
@keyframes floatDock {
  from {
    opacity: 0;
    transform: translate(-50%, 25px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
#quick-dock {
  animation: floatDock 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Skill Card Filter Transitions */
.skill-card {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.skill-card.is-hidden {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* Timeline connector styling */
.timeline-cascade-node {
  perspective: 1000px;
}
.timeline-cascade-node .interactive-beam-card {
  transform-origin: top center;
  transition: box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  will-change: transform, opacity;
}
.timeline-badge {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, box-shadow 0.3s ease;
  will-change: transform, opacity;
}

/* Strictly Ensure Zero Images inside CV preview and printable CV */
#cv-preview img,
#printable-cv img {
  display: none !important;
}

/* Print Styles for CV generation (100% Typographic Clean Document) */
@media print {
  @page {
    size: A4;
    margin: 10mm 15mm;
  }
  
  body {
    background-color: #ffffff !important;
    color: #09090b !important;
    font-size: 10.5pt !important;
    line-height: 1.4 !important;
  }

  /* Hide everything except printable CV */
  header,
  footer,
  #hero,
  #about,
  #skills,
  #education,
  #certifications,
  #vision,
  #contact,
  #toast-container,
  #quick-dock,
  #back-to-top,
  .no-print,
  .print-hide {
    display: none !important;
  }

  #cv-preview {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  #printable-cv {
    display: block !important;
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #09090b !important;
  }

  .page-break-avoid {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    text-decoration: none !important;
    color: inherit !important;
  }
}
