/* ============================================================
   Ubuntu Tech Solutions — custom styles layered on Tailwind CDN
   ============================================================ */

/* Smooth anchor scrolling */
html { scroll-behavior: smooth; }

/* Sticky header transition */
#site-header {
  transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
}
#site-header.is-scrolled {
  background-color: rgba(2, 6, 23, .92);          /* slate-950 @ 92% */
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
  border-color: rgba(51, 65, 85, .6);
}

/* Active nav link */
.nav-active { color: #38bdf8 !important; }         /* sky-400 */
.nav-active::after { width: 100% !important; }

/* Underline micro-interaction for desktop nav links */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  height: 2px; width: 0;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  transition: width .3s ease;
}
.nav-link:hover::after { width: 100%; }

/* Scroll-reveal animation.
   Only hides elements when JS is confirmed running (html.js is added by
   main.js) — if the script ever fails to load, content stays visible. */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
html.js .reveal.revealed { opacity: 1; transform: none; }
/* Optional stagger helpers */
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* Tabs (Tools & Technology) — ensure .hidden always wins over .grid */
[data-panel].hidden { display: none !important; }

/* Tabs (Tools & Technology) */
.tab-active {
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* Card hover lift */
.card-lift {
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(2, 6, 23, .12);
  border-color: rgba(14, 165, 233, .45);
}

/* Subtle grid backdrop for hero */
.hero-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
