/* =========================================================
   DEV HASNAIN PORTFOLIO - FINAL CLEAN CSS
   Author: Muhammad Hasnain
   Organized & Optimized
   ========================================================= */

:root {
  --color-primary: #d7ff3f;
  --color-bg: #0f0f0f;
  --color-bg-elevated: #1e1e1e;
  --color-text-muted: #b8b8b8;
}

/* ====================== TYPOGRAPHY ====================== */
h1,
h2,
h3,
h4,
.font-heading {
  font-family: "Space Grotesk", sans-serif !important;
  letter-spacing: -0.02em;
}

body,
p,
span,
a,
button,
input,
select,
textarea {
  font-family: "Inter", sans-serif;
}

/* ====================== GLOBAL STYLES ====================== */
::selection {
  background: rgba(215, 255, 63, 0.25);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-bg-elevated);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ====================== HEADER ====================== */
#main-header.scrolled {
  top: 1rem;
}
#main-header.scrolled #header-content {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-radius: 1.5rem;
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

/* Navigation */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link.active {
  color: var(--color-primary) !important;
}

/* ====================== ABOUT SECTION ANIMATIONS ====================== */
.button-shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  animation: shine 3s linear infinite;
}

@keyframes shine {
  100% {
    left: 120%;
  }
}

.scan-line {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(215, 255, 63, 0.08),
    transparent
  );
  animation: scanMove 6s linear infinite;
  pointer-events: none;
}

@keyframes scanMove {
  100% {
    top: 120%;
  }
}

.system-execute {
  animation: executeCode 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes executeCode {
  0% {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0px);
  }
  30% {
    transform: translateY(-40px);
    opacity: 0.9;
  }
  60% {
    transform: translateY(-180px);
    opacity: 0.4;
    filter: blur(1px);
  }
  100% {
    transform: translateY(-300px);
    opacity: 0;
    filter: blur(3px);
  }
}

.hide-system {
  opacity: 0;
  transform: scale(0.96);
  filter: blur(10px);
  pointer-events: none;
}

@keyframes horizontal-bounce {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
}

/* ====================== CUSTOM CURSOR ====================== */
body {
  cursor: none;
}

.custom-cursor {
  width: 8px;
  height: 8px;
  background: #d7ff3f;
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(215, 255, 63, 0.6);
  transition: transform 0.05s ease;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(215, 255, 63, 0.45);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999998;
  transform: translate(-50%, -50%);
  transition:
    width 0.25s ease,
    height 0.25s ease,
    border 0.25s ease;
}

.cursor-hover {
  width: 60px !important;
  height: 60px !important;
  border: 1.5px solid #d7ff3f !important;
  background: rgba(215, 255, 63, 0.08);
  backdrop-filter: blur(4px);
}

/* Hide cursor on mobile */
@media (max-width: 1024px), (pointer: coarse) {
  .custom-cursor,
  .cursor-ring {
    display: none !important;
  }
  body {
    cursor: auto !important;
  }
}

/* ====================== PRELOADER ====================== */
#boom-loader {
  
  position: fixed;
  inset: 0;
  background: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition:
    opacity 1.2s ease,
    visibility 1.2s ease;
}

.boom-inner {
  text-align: center;
}

.boom-inner p {
  font-size: clamp(48px, 8vw, 110px);
  font-weight: 700;
  letter-spacing: -3px;
  font-family: "Space Grotesk", sans-serif;
  color: #ffffff;
  opacity: 0;
  transform: translateY(30px);
  animation: revealText 1.4s 0.3s ease forwards;
}

.line {
  width: 180px;
  height: 3px;
  margin: 30px auto 0;
  background: linear-gradient(90deg, transparent, #d7ff3f, transparent);
  box-shadow: 0 0 25px #d7ff3f;
  animation: lineGrow 1.6s 0.8s ease forwards;
}

body.loaded #boom-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes revealText {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lineGrow {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 180px;
    opacity: 1;
  }
}

/* ====================== LENIS SMOOTH SCROLL ====================== */
html {
  scroll-behavior: auto !important;
}
html.lenis {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* ====================== PROCESS SECTION ====================== */
.process-card {
  position: relative;
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  overflow: hidden;
  cursor: default;
  transition:
    border-color 0.5s,
    background 0.5s,
    transform 0.5s,
    box-shadow 0.5s;
}

.process-card:hover {
  border-color: rgba(215, 255, 63, 0.3);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

/* Card Glow */
.card-glow-overlay {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% -10%,
    rgba(215, 255, 63, 0.08) 0%,
    transparent 65%
  );
  transition: opacity 0.5s;
}
.process-card:hover .card-glow-overlay {
  opacity: 1;
}

/* Icon & Other Process Elements */
.icon-wrap {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(215, 255, 63, 0.07);
  border: 1px solid rgba(215, 255, 63, 0.14);
  transition:
    background 0.3s,
    box-shadow 0.3s;
}

.process-card:hover .icon-wrap {
  background: rgba(215, 255, 63, 0.15);
  box-shadow: 0 0 16px rgba(215, 255, 63, 0.25);
}

.process-card:hover .card-icon {
  filter: drop-shadow(0 0 6px rgba(215, 255, 63, 0.7));
}

.card-tag {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  background: rgba(215, 255, 63, 0.07);
  border: 1px solid rgba(215, 255, 63, 0.14);
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #d7ff3f;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Process Spine & Connectors */
.pip {
  position: absolute;
  top: 1.75rem;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.5s;
}

.pip--right {
  right: -5px;
  border-left-color: transparent;
  border-bottom-color: transparent;
}
.pip--left {
  left: -5px;
  border-right-color: transparent;
  border-top-color: transparent;
}

.process-card:hover .pip--right {
  border-right-color: rgba(215, 255, 63, 0.3);
  border-top-color: rgba(215, 255, 63, 0.3);
}
.process-card:hover .pip--left {
  border-left-color: rgba(215, 255, 63, 0.3);
  border-bottom-color: rgba(215, 255, 63, 0.3);
}

.spine-node {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0f0f0f;
  border: 1px solid rgba(215, 255, 63, 0.4);
  transition:
    border-color 0.3s,
    background 0.3s,
    box-shadow 0.3s;
}

.spine-num {
  font-size: 0.68rem;
  font-weight: 900;
  color: #d7ff3f;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.process-step:hover .spine-node {
  border-color: #d7ff3f;
  background: #d7ff3f;
  box-shadow: 0 0 20px rgba(215, 255, 63, 0.4);
}
.process-step:hover .spine-num {
  color: #0f0f0f;
}

.spine-line {
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(215, 255, 63, 0.4),
    rgba(215, 255, 63, 0.25),
    rgba(215, 255, 63, 0.4)
  );
  transition: background 0.5s;
}

.process-step:hover .spine-line {
  background: linear-gradient(to bottom, #d7ff3f, rgba(215, 255, 63, 0.4));
}

.mobile-line {
  position: absolute;
  top: 2.75rem;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(215, 255, 63, 0.4),
    rgba(215, 255, 63, 0.25),
    rgba(215, 255, 63, 0.4)
  );
}
