/* Stealth Gold shared styles: particles, cursor, tilt, marquee, reveal, glass */

body {
  background-color: #131313;
  color: #e5e2e1;
  overflow-x: hidden;
  cursor: none;
}

/* Intro loader */
#intro-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #131313;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}
#intro-loader.loader-done { opacity: 0; pointer-events: none; }
#intro-loader .loader-mark {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f2ca50;
  opacity: 0;
  transform: scale(0.85);
  animation: loader-pop 0.7s cubic-bezier(.16,.84,.44,1) 0.15s forwards;
}
#intro-loader .loader-bar {
  position: absolute;
  bottom: calc(50% - 46px);
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: #2a2a2a;
  overflow: hidden;
}
#intro-loader .loader-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #f2ca50;
  transform: translateX(-100%);
  animation: loader-fill 1.1s ease forwards 0.2s;
}
@keyframes loader-pop {
  to { opacity: 1; transform: scale(1); }
}
@keyframes loader-fill {
  to { transform: translateX(0); }
}
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none !important; }
}

#plexus-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.6;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, #4d4635 1px, transparent 1px),
    linear-gradient(to bottom, #4d4635 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.06;
  z-index: -1;
  pointer-events: none;
}

.scanline {
  width: 100%;
  height: 2px;
  background-color: #f2ca50;
  opacity: 0.5;
  position: absolute;
  top: 0;
  left: 0;
  animation: scan 4s linear infinite;
  z-index: 10;
  pointer-events: none;
}
@keyframes scan {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { top: 100%; opacity: 0; }
}

.cursor-blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.glass-panel {
  background-color: rgba(19, 19, 19, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.stat-card-glow { position: relative; overflow: hidden; }
.stat-card-glow::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(242, 202, 80, 0.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.stat-card-glow:hover::before { opacity: 1; }

/* Custom cursor */
#cursor-dot, #cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 9999px;
  transform: translate(-50%, -50%);
}
#cursor-dot {
  width: 6px; height: 6px;
  background: #f2ca50;
  box-shadow: 0 0 8px 2px rgba(242, 202, 80, 0.7);
}
#cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid rgba(242, 202, 80, 0.5);
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
#cursor-ring.cursor-hover {
  width: 56px; height: 56px;
  background: rgba(242, 202, 80, 0.08);
  border-color: #f2ca50;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.16,.84,.44,1), transform 0.7s cubic-bezier(.16,.84,.44,1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.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; }

/* 3D tilt cards */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}
.tilt-card:hover {
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(242, 202, 80, 0.25);
}
.tilt-card-inner { transform: translateZ(30px); }

/* Hexagon logo badge */
.hex-badge {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(145deg, #2a2a2a, #131313);
  color: #f2ca50;
  flex-shrink: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.hex-badge::before {
  content: '';
  position: absolute;
  inset: 2px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: #131313;
  z-index: 0;
}
.hex-badge .material-symbols-outlined {
  position: relative;
  z-index: 1;
  font-size: 28px;
}
.group:hover .hex-badge {
  transform: scale(1.08) rotate(6deg);
  filter: drop-shadow(0 0 10px rgba(242, 202, 80, 0.5));
}

/* Certification logo tile */
.cert-logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  max-width: 132px;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2a2a2a, #131313);
  border: 1px solid #4d4635;
  flex-shrink: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.cert-logo-tile img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.group:hover .cert-logo-tile {
  transform: scale(1.06);
  filter: drop-shadow(0 0 10px rgba(242, 202, 80, 0.4));
}

/* Marquee */
.marquee-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Certification card hover overlay (masterPortfolio-inspired) */
.cert-overlay-content {
  position: relative;
  overflow: hidden;
}
.cert-overlay-content .content-overlay {
  position: absolute;
  inset: 0;
  background: rgba(19, 19, 19, 0.92);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.cert-overlay-content:hover .content-overlay { opacity: 1; }
.cert-overlay-content .content-details {
  transform: translateY(12px);
  opacity: 0;
  transition: all 0.35s ease;
  text-align: center;
  padding: 0 16px;
}
.cert-overlay-content:hover .content-details {
  transform: translateY(0);
  opacity: 1;
}
