@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-outfit: 'Outfit', sans-serif;
  --font-fira: 'Fira Code', monospace;
  --color-bg: #030307;
  --color-glass: rgba(10, 10, 16, 0.65);
  --color-glass-hover: rgba(18, 18, 28, 0.85);
  --color-glass-border: rgba(255, 255, 255, 0.04);
  --color-glass-border-hover: rgba(99, 102, 241, 0.4);

  /* Cyber Gradients */
  --grad-cyber: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #f43f5e 100%);
  --grad-primary: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  --grad-accent: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-outfit);
  scroll-behavior: smooth;
  background-color: rgb(30 35 54 / 100%);
}

body {
  color: #f8fafc;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background: var(--color-bg);
}

/* Cosmic Dot Matrix Background overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #040409;
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.25);
  border-radius: 999px;
  border: 1px solid #040409;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}

/* Rotating Mesh Aurora Blobs */
.bg-mesh-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  filter: blur(140px);
}

.bg-mesh-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.22;
  mix-blend-mode: screen;
  animation: rotate-blobs 30s infinite linear;
}

.blob-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.8) 0%, rgba(99, 102, 241, 0) 70%);
  top: -15%;
  left: -10%;
  transform-origin: 40% 40%;
}

.blob-2 {
  width: 750px;
  height: 750px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.7) 0%, rgba(244, 63, 94, 0) 70%);
  bottom: -20%;
  right: -10%;
  transform-origin: 60% 60%;
  animation-duration: 40s;
  animation-direction: reverse;
}

.blob-3 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.65) 0%, rgba(168, 85, 247, 0) 70%);
  top: 35%;
  left: 35%;
  transform-origin: 50% 50%;
  animation-duration: 25s;
}

@keyframes rotate-blobs {
  0% {
    transform: rotate(0deg) translate(0px, 0px) scale(1);
  }

  50% {
    transform: rotate(180deg) translate(40px, -40px) scale(1.1);
  }

  100% {
    transform: rotate(360deg) translate(0px, 0px) scale(1);
  }
}

/* Premium Frosted Glass Panel System */
.glass-panel {
  background: var(--color-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-glass-border);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

/* Glowing Border Draw on Hover */
.glass-panel-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: all 0.5s ease;
}

.glass-panel-hover:hover::before {
  background: var(--grad-cyber);
}

.glass-panel-hover:hover {
  background: var(--color-glass-hover);
  border-color: transparent;
  transform: translateY(-6px) scale(1.005);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7), 0 0 25px rgba(99, 102, 241, 0.15);
}

/* Holographic Floating Avatar */
.avatar-hologram {
  position: relative;
  transition: all 0.5s ease;
}

.avatar-hologram::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  border: 1.5px solid rgba(99, 102, 241, 0.25);
  animation: hologram-pulse 4s infinite linear;
  pointer-events: none;
}

@keyframes hologram-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
    border-color: rgba(99, 102, 241, 0.3);
  }

  50% {
    transform: scale(1.04);
    opacity: 0.2;
    border-color: rgba(244, 63, 94, 0.3);
  }

  100% {
    transform: scale(1);
    opacity: 0.6;
    border-color: rgba(99, 102, 241, 0.3);
  }
}

/* ── NAVIGATION TABS ── */
.nav-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(148, 163, 184, 0.9);
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.nav-tab:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.07);
}

.nav-tab-active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%);
  color: #c7d2fe !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Hide scrollbar on nav list (for mobile overflow scroll) */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ── NAV NAME TYPEWRITER ── */
.typewriter-name {
  display: inline-block;
  border-right: 2px solid rgba(99, 102, 241, 0.8);
  animation:
    nav-type 0.7s steps(8, end) 0.4s both,
    nav-cursor 0.6s step-end 0.4s 4,
    nav-cursor-hide 0s 3s forwards;
}

@keyframes nav-type {
  from {
    width: 0;
  }

  to {
    width: 4.6em;
  }
}

@keyframes nav-cursor {

  0%,
  100% {
    border-color: rgba(99, 102, 241, 0.8);
  }

  50% {
    border-color: transparent;
  }
}

@keyframes nav-cursor-hide {
  to {
    border-color: transparent;
  }
}

/* Real-Time Cyber Age Display */
.cyber-age-led {
  background: #05050e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Hacker Cyber Typewriter Motto */
.cyber-typewriter {
  font-family: var(--font-fira);
  position: relative;
}

.cyber-typewriter::after {
  content: '_';
  animation: blink-cursor 0.75s infinite steps(2);
  color: #818cf8;
}

@keyframes blink-cursor {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Continuous Skill Slider Marquee */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, white 15%, white 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, white 15%, white 85%, transparent);
}

.marquee-content {
  display: flex;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}

.marquee-content:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Shimmer Progress Fills */
.shimmer-progress-fill {
  position: relative;
  overflow: hidden;
}

.shimmer-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer-sweep 2.4s infinite linear;
}

@keyframes shimmer-sweep {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Floating Responsive Touch-Bar Dock */
.navigation-dock-active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.05);
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* High-End TIMELINE Components */
.timeline-dot {
  position: absolute;
  left: -25px !important;
}

@media (min-width: 768px) {
  .timeline-dot {
    left: -33px !important;
  }
}

.timeline-dot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #6366f1;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), 0 0 15px #6366f1;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item-group:hover .timeline-dot::before {
  background: #f43f5e;
  box-shadow: 0 0 0 6px rgba(244, 63, 94, 0.35), 0 0 22px #f43f5e;
  transform: translate(-50%, -50%) scale(1.35);
}

/* Laser-track Glowing Timelines */
.timeline-track-glow {
  width: 2px;
  background: linear-gradient(to bottom, rgba(99, 102, 241, 0.45) 0%, rgba(168, 85, 247, 0.25) 50%, rgba(99, 102, 241, 0.05) 100%);
}

/* Views reveal transitions */
.portfolio-section {
  display: none !important;
  /* Hide entirely when not active so container fits content */
  opacity: 0;
  transform: translateY(30px) scale(0.995);
  animation: viewFadeOut 0.4s ease forwards;
}

.portfolio-section.active {
  display: flex !important;
  /* Or grid, but we have flex flex-col in HTML */
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: viewFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.995);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes viewFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(30px) scale(0.995);
  }
}

/* Animated Cyber Border for Sidebar */
.animated-border-card {
  position: relative;
  z-index: 1;
}

.animated-border-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(90deg,
      #6366f1,
      #a855f7,
      #f43f5e,
      #10b981,
      #3b82f6,
      #6366f1);
  background-size: 300% 300%;
  animation: border-rgb-glow 8s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes border-rgb-glow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ═══════════════════════════════════════════════════
   MOBILE VERTICAL FLOATING GLASS DOCK
   ═══════════════════════════════════════════════════ */
@media (max-width: 1023px) {

  /* Push content flush against the vertical nav strip on the left */
  .mobile-main-offset {
    padding-left: 64px !important;
    padding-right: 16px !important;
    gap: 0 !important;
  }

  /* ── Flush Content Panel connection on mobile ── */
  .mobile-main-offset .mobile-profile-panel.glass-panel,
  .mobile-main-offset article > .glass-panel,
  .mobile-main-offset article > section.glass-panel,
  .mobile-main-offset article > header.glass-panel {
    border-left: none !important;
    border-radius: 0 24px 24px 0 !important;
    background: rgba(12, 13, 20, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.35) !important;
  }

  /* ── The vertical nav strip ── */
  .mobile-vnav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 64px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(180deg, rgba(9, 10, 16, 0.7) 0%, rgba(4, 4, 7, 0.7) 100%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-right: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  }

  /* ── Each tab button ── */
  .vnav-item {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
  }

  /* Icon */
  .vnav-item ion-icon {
    font-size: 20px;
    color: rgba(148, 163, 184, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
    margin-bottom: 2px;
  }

  /* Clean Horizontal Label */
  .vnav-item span {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.4);
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    line-height: 1;
    display: block;
  }

  /* ── ACTIVE state (Seamless Connection to Panel + Vivid Color) ── */
  .vnav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.25) 0%, rgba(12, 13, 20, 0.65) 100%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    width: calc(100% + 2px) !important;
    position: relative;
    right: -1px;
    z-index: 10;
    border-radius: 20px 0 0 20px !important;
    border: none !important;
    border-left: 2px solid rgba(99, 102, 241, 0.6) !important;
    box-shadow: inset 4px 0 18px rgba(99, 102, 241, 0.18), -2px 0 12px rgba(0, 0, 0, 0.3);
    margin: 0 !important;
  }

  .vnav-item.active ion-icon {
    color: #a5b4fc;
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.7));
    animation: iconBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  }

  .vnav-item.active span {
    color: #c7d2fe;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  }

  /* Icon bounce animation */
  @keyframes iconBounce {
    0% { transform: scale(0.85); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1.1); }
  }

  /* Concave curve Top */
  .vnav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: 100%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at top left, transparent 20px, rgba(10, 10, 18, 0.65) 20px);
    pointer-events: none;
  }

  /* Concave curve Bottom */
  .vnav-item.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 100%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at bottom left, transparent 20px, rgba(10, 10, 18, 0.65) 20px);
    pointer-events: none;
  }

  /* ── Mobile profile panel (aside as tab content) ── */
  .mobile-profile-panel {
    display: none !important;
    width: 100% !important;
    border-radius: 0 24px 24px 0 !important;
    overflow: hidden;
  }

  .mobile-profile-panel.active {
    display: flex !important;
  }

  /* ── Article sections on mobile ── */
  .portfolio-section {
    padding-top: 0.5rem;
  }
}


/* Drawer Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Micro-chip styled Tech Badge clouds */
.tech-badge-chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
}

.tech-badge-chip:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

/* Live Active Pulsar Indicator */
.active-pulse {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  position: relative;
}

.active-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid #10b981;
  animation: ping-wave 1.6s infinite ease-out;
  opacity: 0.8;
}

@keyframes ping-wave {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  100% {
    transform: scale(2.3);
    opacity: 0;
  }
}

/* Floating Dock navigation container positioning */
@media (max-width: 640px) {
  .floating-bottom-dock {
    position: fixed;
    bottom: 20px;
    left: 16px;
    right: 16px;
    z-index: 50;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.6);
  }
}

/* ═══════════════════════════════════════════════════
   CUSTOM INTERACTIVE CURSOR (SNAKE EFFECT)
   ═══════════════════════════════════════════════════ */
@media (pointer: fine) {
  body, a, button, input, textarea, select, .nav-tab, .vnav-item {
    cursor: none !important;
  }
}

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  background-color: #6366f1; /* Brand accent */
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 10px #6366f1, 0 0 20px #6366f1;
}

.cursor-dot.hover {
  background-color: #34d399; /* Emerald */
  box-shadow: 0 0 15px #34d399, 0 0 30px #34d399;
}

/* SAY ALHAMDULILAH – bare floating text, no container */
.say-alhamd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(165, 180, 252, 0.55);
  cursor: grab;
  user-select: none;
  touch-action: none;
  position: relative;
  transition: color 0.25s ease, transform 0.25s ease, text-shadow 0.25s ease;
  will-change: transform;
}

.say-alhamd:hover {
  color: #a5b4fc;
  text-shadow: 0 0 12px rgba(99, 102, 241, 0.6), 0 0 28px rgba(99, 102, 241, 0.25);
  animation: alhamdBounce 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.5) forwards;
}

/* Draggable base state */
.draggable-alhamd {
  user-select: none;
  touch-action: none;
}

@media (pointer: fine) {
  .draggable-alhamd {
    cursor: grab;
  }
  .draggable-alhamd:active {
    cursor: grabbing !important;
  }
}

.draggable-alhamd.dragging {
  color: #c7d2fe !important;
  text-shadow: 0 0 16px rgba(99, 102, 241, 0.8), 0 0 32px rgba(99, 102, 241, 0.4) !important;
}

/* The angled-up arrow icon */
.say-alhamd-arrow {
  font-size: 10px;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.5), color 0.25s ease;
  transform: rotate(-45deg); /* points top-right (diagonal up) */
  display: inline-block;
}

.say-alhamd:hover .say-alhamd-arrow {
  transform: rotate(-45deg) translateY(-2px) translateX(2px);
}

/* Bounce pop animation on hover */
@keyframes alhamdBounce {
  0%   { transform: translateY(0px) scale(1); }
  30%  { transform: translateY(-6px) scale(1.06); }
  60%  { transform: translateY(1px) scale(0.98); }
  80%  { transform: translateY(-2px) scale(1.02); }
  100% { transform: translateY(0px) scale(1); }
}