/* ============================================
   SindByte Shared Styles — Scroll animations,
   glow effects, accordion, utilities
   ============================================ */

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* --- Glow Hover Effects --- */
.glow-hover {
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.glow-hover:hover {
  box-shadow: 0 0 24px rgba(0, 243, 255, 0.22);
  border-color: rgba(0, 243, 255, 0.55) !important;
  transform: translateY(-3px);
}
.glow-gold:hover {
  box-shadow: 0 0 24px rgba(255, 181, 31, 0.22);
  border-color: rgba(255, 181, 31, 0.55) !important;
}
.glow-purple:hover {
  box-shadow: 0 0 24px rgba(188, 19, 254, 0.22);
  border-color: rgba(188, 19, 254, 0.55) !important;
}

/* --- Gradient Border Animation --- */
@keyframes borderRotate {
  from { --angle: 0deg; }
  to   { --angle: 360deg; }
}
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.gradient-border {
  position: relative;
  background: rgba(12, 20, 34, 0.9);
  border-radius: 14px;
}
.gradient-border::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: conic-gradient(from var(--angle), #00f3ff, #bc13fe, #ffb51f, #00f3ff);
  animation: borderRotate 6s linear infinite;
  z-index: -1;
  opacity: 0.6;
}

/* --- Accordion Styles --- */
.sb-accordion .accordion-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.sb-accordion .accordion-button {
  background: transparent;
  color: #e9edf7;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  padding: 16px 20px;
  box-shadow: none;
}
.sb-accordion .accordion-button:not(.collapsed) {
  color: #00f3ff;
  background: rgba(0, 243, 255, 0.05);
  box-shadow: none;
}
.sb-accordion .accordion-button::after {
  filter: invert(1);
  transition: transform 0.3s ease;
}
.sb-accordion .accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}
.sb-accordion .accordion-body {
  color: #9fb1c8;
  padding: 0 20px 18px;
  line-height: 1.7;
}
.sb-accordion .accordion-body code {
  color: #00f3ff;
  background: rgba(0, 243, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- Feature Highlight Cards --- */
.feature-highlight {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.05) 0%, rgba(188, 19, 254, 0.05) 100%);
  border: 1px solid rgba(0, 243, 255, 0.18);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.feature-highlight::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(0, 243, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* --- Terminal Typewriter Cursor --- */
.typewriter-cursor::after {
  content: '▋';
  color: #00f3ff;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* --- Image Hover Zoom --- */
.img-zoom {
  overflow: hidden;
  border-radius: 12px;
}
.img-zoom img {
  transition: transform 0.5s ease;
  width: 100%;
  display: block;
}
.img-zoom:hover img {
  transform: scale(1.04);
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #00f3ff, #bc13fe, #ffb51f);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 243, 255, 0.1);
  border: 1px solid rgba(0, 243, 255, 0.4);
  color: #00f3ff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.2s;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: rgba(0, 243, 255, 0.25);
}

/* --- Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .gradient-border::before {
    animation: none !important;
  }
  .typewriter-cursor::after {
    animation: none !important;
  }
}

/* --- Lazy Load Fade --- */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded {
  opacity: 1;
}

/* --- Utility Classes --- */
.text-gradient {
  background: linear-gradient(90deg, #00f3ff, #bc13fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.border-glow {
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.12);
}
.bg-glass {
  background: rgba(12, 20, 34, 0.86);
  backdrop-filter: blur(10px);
}
