html { scroll-padding-top: 100px; }
body { font-family: 'Inter', sans-serif; }
h1,h2,h3,h4,.font-display { font-family: 'Poppins', sans-serif; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a192f; }
::-webkit-scrollbar-thumb { background: #0052cc; border-radius: 10px; }

.bg-grid {
  background-image: linear-gradient(rgba(0,102,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(0,102,255,0.08) 1px, transparent 1px);
  background-size: 42px 42px;
}

.glass-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.nav-link { position: relative; color: #cbd5e1; transition: color .25s ease; }
.nav-link:hover { color: #ffffff; }
.nav-link.active { color: #66a3ff; }
.nav-link.active::after {
  content: ''; position: absolute; left: 0; bottom: -8px; width: 100%; height: 2px;
  background: linear-gradient(90deg,#0052cc,#66a3ff); border-radius: 2px;
}

.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s cubic-bezier(.21,.6,.35,1), transform .7s cubic-bezier(.21,.6,.35,1); }
.reveal-visible { opacity: 1; transform: translateY(0); }

.marquee-wrap {
  -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);
  overflow: hidden;
}
.marquee-track { display: flex; width: max-content; animation: marquee-scroll 26s linear infinite; }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tab-btn.active { background: linear-gradient(90deg,#0052cc,#0066ff); color: #fff; box-shadow: 0 8px 25px rgba(0,82,204,0.4); }

/* Flexbox (not grid) on purpose: wrapped rows center themselves with no
   leftover blank cells when a filter leaves a partial last row. */
#projectsGrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; }
.project-card { flex: 0 1 340px; max-width: 340px; width: 100%; transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease, flex-basis .3s ease, max-width .3s ease; }
.project-card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px rgba(0,0,0,0.5); border-color: rgba(0,102,255,0.5); }

#modalBackdrop { transition: opacity .3s ease; }
#modalPanel { transition: transform .35s cubic-bezier(.21,.7,.3,1), opacity .35s ease; }

.step-line::before {
  content: ''; position: absolute; top: 28px; left: 50%; width: 100%; height: 2px;
  background: linear-gradient(90deg, rgba(0,102,255,0.5), rgba(0,102,255,0.05));
  z-index: 0;
}
.step-item:last-child .step-line::before { display: none; }

input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 3px rgba(0,102,255,0.35); }

.float-slow { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-14px);} }
