/* ============================================================
   COMPONENTS & SECTIONS — Shan Asharaf Portfolio
   Sticky navbar, swarming-bee typography, pinned horizontal
   scroll showcase, skills meters, career journey, and
   swinging "SHAN ASHARAF DEPLOYED" hanging signboard footer.
   ============================================================ */

/* ── 1. STICKY TRANSLUCENT NAVBAR ────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.nav-logo-mark {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--candy-red), var(--candy-red-deep));
  border-radius: 6px;
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 0.05em;
  box-shadow: 0 0 16px var(--candy-glow);
}

.nav-status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.7);
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.nav-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-block;
  padding-block: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: color 200ms var(--ease-soft);
}
.nav-link:hover, .nav-link.active-link {
  color: #ffffff;
}

/* Gliding Red Underline Indicator */
#nav-glider {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--candy-red-hi), var(--candy-red));
  box-shadow: 0 0 10px var(--candy-glow);
  border-radius: 2px;
  pointer-events: none;
  transition: transform 300ms var(--ease-spring), width 300ms var(--ease-spring), opacity 200ms;
  opacity: 0;
}

.nav-mobile-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.nav-mobile-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 300ms var(--ease-soft), opacity 300ms;
}

/* ── 2. DYNAMIC SWARMING-BEE TYPOGRAPHY ───────────────────────── */
.swarm-target {
  display: inline-block;
  white-space: pre-wrap;
  user-select: none;
  perspective: 800px;
}

.swarm-char {
  display: inline-block;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform, opacity, color;
  transition: transform 750ms var(--ease-spring),
              opacity 500ms var(--ease-soft),
              color 450ms var(--ease-soft),
              text-shadow 450ms var(--ease-soft);
}

/* 3D Scattered State */
.swarm-char.is-scattered {
  opacity: 0.22;
  color: var(--candy-red-hi) !important;
  text-shadow: 0 0 18px rgba(255, 23, 68, 0.95), 0 0 32px rgba(255, 69, 105, 0.7);
  transform: translate3d(var(--sx, 40px), var(--sy, -40px), var(--sz, 40px)) rotate(var(--sr, 25deg)) scale(1.18);
}

/* Mid-flight buzzing wobble */
.swarm-char.is-buzzing {
  animation: beeBuzz 180ms ease-in-out 2 alternate;
}
@keyframes beeBuzz {
  0%   { transform: translate3d(calc(var(--sx) * 0.3), calc(var(--sy) * 0.3), calc(var(--sz) * 0.3)) rotate(6deg); }
  100% { transform: translate3d(calc(var(--sx) * 0.25 + 3px), calc(var(--sy) * 0.25 - 4px), calc(var(--sz) * 0.25)) rotate(-7deg); }
}

/* ── 3. ABOUT SECTION ─────────────────────────────────────────── */
.about-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 36px;
}

.stat-card {
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(20, 20, 25, 0.8) 0%, rgba(10, 10, 14, 0.92) 100%);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), var(--inset-gloss);
  transition: transform 200ms var(--ease-soft), border-color 200ms var(--ease-soft);
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--candy-edge);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  font-feature-settings: 'tnum';
}
.stat-plus {
  color: var(--candy-red);
  font-size: 0.8em;
  margin-left: 2px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── 4. PINNED HORIZONTAL SCROLL SPOTLIGHTS ────────────────────── */
.spotlights-scroll-container {
  position: relative;
  height: 360vh;
  background: #000000;
}

.spotlights-sticky-window {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #000000;
}

.spotlights-horizontal-track {
  display: flex;
  gap: 56px;
  padding-inline: var(--pad-x);
  width: max-content;
  will-change: transform;
}

/* Horizontal Panel: Full-Screen 100vh Photo 3 Showcase */
.horizontal-panel-photo {
  width: clamp(780px, 78vw, 1160px);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  flex-shrink: 0;
}

/* Horizontal Panel: Standard Showcase Card */
.horizontal-panel-card {
  width: clamp(360px, 32vw, 460px);
  height: clamp(480px, 70vh, 620px);
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  flex-shrink: 0;
}

.spotlight-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  background: var(--candy-tint);
  border: 1px solid var(--candy-edge);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--candy-red);
  margin-bottom: 20px;
}

.spotlight-metric {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #22c55e;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line-subtle);
}

.horizontal-progress-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}
#horizontal-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--candy-red-deep), var(--candy-red));
  box-shadow: 0 0 10px var(--candy-glow);
  transition: width 80ms linear;
}

/* ── 5. SKILLS SECTION (Chips & Animated Meters) ──────────────── */
.skills-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

.skill-category-card {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.skill-icon-header {
  font-size: 28px;
  margin-bottom: 16px;
}

.skill-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 16px 24px;
}

.skill-chip {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-subtle);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: default;
  transition: border-color 200ms var(--ease-soft),
              color 200ms var(--ease-soft),
              background 200ms var(--ease-soft),
              box-shadow 200ms var(--ease-soft);
}
.skill-chip:hover {
  border-color: var(--candy-red);
  color: #ffffff;
  background: rgba(255, 23, 68, 0.14);
  box-shadow: 0 0 16px rgba(255, 23, 68, 0.4);
}

.meter-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}

.meter-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meter-info {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.meter-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--candy-red-deep) 0%, var(--candy-red) 100%);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--candy-glow);
  transition: width 1200ms var(--ease-out);
}

/* ── 6. JOURNEYS SECTION (Timeline) ───────────────────────────── */
.journey-timeline-col {
  position: relative;
  padding-left: 36px;
}

.journey-track-line {
  position: absolute;
  top: 12px; left: 11px; bottom: 12px;
  width: 2px;
  background: var(--line-subtle);
}
.journey-fill-line {
  position: absolute;
  top: 12px; left: 11px;
  width: 2px;
  height: 0%;
  background: var(--candy-red);
  box-shadow: 0 0 10px var(--candy-glow);
  transition: height 250ms ease-out;
}

.journey-items-list {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.journey-item {
  position: relative;
}

.journey-dot {
  position: absolute;
  left: -36px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--candy-red);
  border: 2px solid #000000;
  box-shadow: 0 0 14px var(--candy-glow);
}

.journey-date {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--candy-red);
  margin-bottom: 6px;
}

.journey-role {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.journey-company {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── 7. FOOTER: HANGING "SHAN ASHARAF DEPLOYED" SIGNBOARD ──────── */
#site-footer {
  padding-block: clamp(90px, 12vw, 150px) 44px;
  background: #000000;
  border-top: 1px solid var(--line-subtle);
  position: relative;
  overflow: hidden;
}

/* Hanging chains & swinging signboard wrap */
.sign-hanger-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-bottom: 72px;
}

.sign-chain-pair {
  position: relative;
  width: min(85vw, 560px);
  height: 70px;
}

.sign-chain-l,
.sign-chain-r {
  position: absolute;
  top: -20px;
  width: 2.5px;
  height: 90px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.45) 0,
    rgba(255, 255, 255, 0.45) 4px,
    transparent 4px,
    transparent 8px
  );
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}
.sign-chain-l { left: 40px; }
.sign-chain-r { right: 40px; }

/* The Swinging Signboard (Pendulum motion +/-3deg, 4-6s) */
.hanging-deployed-sign {
  position: relative;
  width: min(92vw, 640px);
  background: linear-gradient(135deg, rgba(20, 20, 26, 0.94) 0%, rgba(9, 9, 12, 0.98) 100%);
  border: 1px solid rgba(255, 23, 68, 0.45);
  border-top-color: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.98),
              0 0 38px var(--candy-glow),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  padding: 36px 36px 30px;
  text-align: center;
  transform-origin: top center;
  animation: signPendulum 5s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes signPendulum {
  0%   { transform: rotate(-3deg); }
  100% { transform: rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hanging-deployed-sign {
    animation: none !important;
    transform: none !important;
  }
}

/* Sign Title: SHAN ASHARAF DEPLOYED */
.sign-deployed-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4.2vw, 42px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff 30%, var(--candy-red-hi) 75%, var(--candy-red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 23, 68, 0.5));
  margin-bottom: 14px;
}

/* Terminal Status Line */
.sign-terminal-status {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--line-subtle);
  border-radius: 20px;
  margin-bottom: 24px;
}

/* Pulsing Green-to-Red Live Indicator */
.live-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: liveColorShift 4s ease-in-out infinite alternate;
}
@keyframes liveColorShift {
  0%, 45% {
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
  }
  55%, 100% {
    background: var(--candy-red);
    box-shadow: 0 0 12px var(--candy-glow);
  }
}

/* Animated Pipeline Nodes (Build -> Test -> Deploy) */
.sign-pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-block: 8px 24px;
}
.pipeline-node-chip {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 23, 68, 0.35);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 23, 68, 0.2);
}
.pipeline-flow-connector {
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--candy-red), var(--candy-red-hi));
  box-shadow: 0 0 8px var(--candy-glow);
}

/* Floating Code & Container Badges */
.sign-floating-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.floating-badge {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-subtle);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* Bottom Bar */
.footer-bottom-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--line-subtle);
}

.footer-social-row {
  display: flex;
  gap: 12px;
}
.social-button {
  padding: 8px 18px;
  background: var(--bg-surface-1);
  border: 1px solid var(--line-subtle);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 200ms var(--ease-soft),
              border-color 200ms var(--ease-soft),
              box-shadow 200ms var(--ease-soft);
}
.social-button:hover {
  color: #ffffff;
  border-color: var(--candy-red);
  box-shadow: 0 0 18px var(--candy-glow);
}

.scroll-top-btn {
  background: none;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 200ms var(--ease-soft), border-color 200ms var(--ease-soft);
}
.scroll-top-btn:hover {
  color: var(--candy-red);
  border-color: var(--candy-red);
}

/* ── 8. RESPONSIVE MEDIA QUERIES (360px to 4K) ───────────────── */
@media (max-width: 1024px) {
  .skills-categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 840px) {
  .spotlights-scroll-container {
    height: auto;
  }
  .spotlights-sticky-window {
    position: relative;
    height: auto;
    overflow: visible;
  }
  .spotlights-horizontal-track {
    flex-direction: column;
    width: 100%;
    gap: 40px;
    padding-inline: 0;
  }
  .horizontal-panel-photo {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .horizontal-panel-card {
    width: 100%;
    height: auto;
  }
  .horizontal-progress-bar {
    display: none;
  }
}

@media (max-width: 768px) {
  .grid-12 {
    display: flex;
    flex-direction: column;
    gap: 48px;
  }
  .col-5, .col-7, .col-6 {
    width: 100%;
  }

  .nav-mobile-btn {
    display: flex;
  }
  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0; bottom: 0;
    background: rgba(4, 4, 6, 0.98);
    backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: 32px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 350ms var(--ease-out), opacity 250ms;
  }
  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-link {
    font-size: 17px;
  }

  .skills-categories-grid,
  .about-stats-grid {
    grid-template-columns: 1fr;
  }

  .sign-chain-pair {
    width: 90vw;
  }
  .hanging-deployed-sign {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .hero-btn-row {
    flex-direction: column;
    width: 100%;
  }
  .hero-btn-row .btn {
    width: 100%;
  }
  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
