/* =========================================
   DataLM — Custom Styles
   ========================================= */

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #030712; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #f97316, #ec4899);
  border-radius: 3px;
}

/* ---------- Gradient Text ---------- */
.gradient-text {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Glass Card ---------- */
.glass-card {
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- Gradient Button ---------- */
.btn-glow {
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: #fff;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-glow:hover {
  opacity: 0.92;
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.5);
}

/* ---------- Animated Blobs ---------- */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.12;
  pointer-events: none;
  animation: blobDrift 24s ease-in-out infinite;
}
.blob-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, #f97316, transparent 70%);
  top: -250px; left: -250px;
  animation-delay: 0s;
}
.blob-2 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, #ec4899, transparent 70%);
  bottom: -200px; right: -200px;
  animation-delay: -8s;
}
.blob-3 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, #db2777, transparent 70%);
  top: 40%; left: 35%;
  animation-delay: -16s;
}
@keyframes blobDrift {
  0%,  100% { transform: translate(0, 0) scale(1); }
  33%        { transform: translate(40px, -40px) scale(1.06); }
  66%        { transform: translate(-30px, 25px) scale(0.94); }
}

/* ---------- Grid Background ---------- */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

/* ---------- Navbar Scrolled ---------- */
#navbar.scrolled {
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 4px 40px rgba(0,0,0,0.6);
}

/* ---------- Nav Link Hover Underline ---------- */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, #f97316, #ec4899);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: #fff; }

/* ---------- Floating Hero Cards ---------- */
.float-1 {
  animation: cardFloat 7s ease-in-out infinite;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.float-2 {
  animation: cardFloat 7s ease-in-out infinite reverse;
  animation-delay: -3.5s;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%       { transform: translateY(-18px) rotate(1deg); }
}

/* ---------- Skill Bars ---------- */
.skill-track {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}
.skill-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f97316, #ec4899);
  border-radius: 3px;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Service Cards ---------- */
.service-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: 0 24px 60px rgba(249, 115, 22, 0.12);
}

/* ---------- Icon Wrap ---------- */
.icon-wrap {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
}
.service-card:hover .icon-wrap { transform: scale(1.1); }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  padding: 3px 11px;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #fb923c;
}

/* ---------- Portfolio Filter Buttons ---------- */
.filter-btn {
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.25s ease;
}
.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, #f97316, #ec4899);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.35);
}

/* ---------- Portfolio Item ---------- */
.portfolio-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 60px rgba(0,0,0,0.5);
}
.portfolio-item.hidden-item {
  display: none;
}

/* ---------- Input Fields ---------- */
.input-field {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.input-field:focus {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(249, 115, 22, 0.06);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

/* ---------- Social Buttons ---------- */
.social-btn {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.social-btn:hover { transform: translateY(-2px); }

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Toast / Notification ---------- */
#toast {
  animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Back to Top ---------- */
#back-to-top {
  display: flex;
}
#back-to-top.show {
  display: flex;
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 768px) {
  .blob-1, .blob-2, .blob-3 { opacity: 0.07; }
}

/* ========== MOBILE RESPONSIVE ========== */

/* Portfolio cards — full width on small screens */
@media (max-width: 640px) {
  #portfolio-grid {
    grid-template-columns: 1fr !important;
  }

  /* Portfolio card image height */
  .portfolio-item .h-48 {
    height: 200px;
  }

  /* Always show hover overlay buttons on touch devices */
  .portfolio-item .group-hover\:opacity-100 {
    opacity: 1 !important;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    align-items: flex-end;
    padding-bottom: 12px;
  }

  /* Tag wrapping */
  .portfolio-item .flex-wrap {
    gap: 6px;
  }

  /* Prevent text overflow in bullets */
  .portfolio-item ul li {
    font-size: 11px;
  }

  /* Hero headline sizing */
  h1 {
    font-size: 2.5rem !important;
    line-height: 1.1 !important;
  }

  /* Section padding */
  section {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  /* Stats grid — 2 columns on mobile */
  .grid.grid-cols-2.md\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
  }

  /* Contact form full width inputs */
  .grid.sm\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* Filter buttons wrap nicely */
  .filter-btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  /* About grid stacks */
  .grid.md\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* CTA buttons full width */
  .flex-wrap.items-center.justify-center.gap-4 a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Footer links */
  footer .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
}

/* Tablet tweaks */
@media (min-width: 641px) and (max-width: 1023px) {
  #portfolio-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  h1 {
    font-size: 3.5rem !important;
  }
}

/* Touch devices — show overlay links permanently */
@media (hover: none) {
  .portfolio-item [class*="opacity-0"] {
    opacity: 1 !important;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
    align-items: flex-end;
    padding-bottom: 10px;
  }
}
