/* ===========================
   GLOBAL CSS – Kanishkar Portfolio
   =========================== */

:root {
  --cyan: #00e5ff;
  --purple: #a78bfa;
  --green: #34d399;
  --bg-dark: #060a0f;
  --bg-card: #0d1117;
  --bg-card2: #111827;
  --border: rgba(255,255,255,0.06);
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
}

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

html { font-family: var(--font-body); }

body {
  background: var(--bg-dark);
  color: #e2e8f0;
  overflow-x: hidden;
}

/* Noise Overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 2px; }

/* ---- SELECTION ---- */
::selection { background: rgba(0,229,255,0.25); color: #fff; }

/* ---- TYPOGRAPHY ---- */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.font-body { font-family: var(--font-body); }

/* ---- GLOW EFFECTS ---- */
.glow-cyan { text-shadow: 0 0 20px rgba(0,229,255,0.6), 0 0 60px rgba(0,229,255,0.3); }
.glow-purple { text-shadow: 0 0 20px rgba(167,139,250,0.6), 0 0 60px rgba(167,139,250,0.3); }

.btn-glow {
  box-shadow: 0 0 20px rgba(0,229,255,0.3), inset 0 0 20px rgba(0,229,255,0.05);
  transition: all 0.3s ease;
}
.btn-glow:hover {
  box-shadow: 0 0 35px rgba(0,229,255,0.6), inset 0 0 30px rgba(0,229,255,0.1);
  transform: translateY(-2px);
}

.btn-outline-glow {
  box-shadow: 0 0 0 1px rgba(0,229,255,0.4);
  transition: all 0.3s ease;
}
.btn-outline-glow:hover {
  box-shadow: 0 0 20px rgba(0,229,255,0.4), 0 0 0 1px rgba(0,229,255,0.8);
  transform: translateY(-2px);
}

/* ---- CARD ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  border-color: rgba(0,229,255,0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(0,229,255,0.05);
}

/* ---- SKILL BAR ---- */
.skill-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- SECTION LABEL ---- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.8;
}

/* ---- GRADIENT TEXT ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- GRID BACKGROUND ---- */
.grid-bg {
  background-image:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ---- ANIMATED BORDER ---- */
.animated-border {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}
.animated-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--cyan), transparent, var(--purple));
  border-radius: 12px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.animated-border:hover::before { opacity: 1; }

/* ---- FADE IN ANIMATIONS ---- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- NAV ---- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
#navbar.scrolled {
  background: rgba(6,10,15,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

/* ---- HERO SCANLINE ---- */
.scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
}

/* ---- CURSOR BLINK ---- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.cursor-blink {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--cyan);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

/* ---- PROJECT CARD IMAGE OVERLAY ---- */
.project-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(6,10,15,0.95) 100%);
}

/* ---- TIMELINE ---- */
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: var(--bg-dark);
  flex-shrink: 0;
  position: relative;
}
.timeline-dot::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}
.timeline-line {
  position: absolute;
  left: 5px;
  top: 18px;
  bottom: -18px;
  width: 2px;
  background: linear-gradient(to bottom, currentColor, transparent);
  opacity: 0.2;
}

/* ---- CERT BADGE ---- */
.cert-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid;
}

/* ---- CONTACT FORM ---- */
.form-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 16px;
  color: #e2e8f0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input::placeholder { color: rgba(255,255,255,0.25); }
.form-input:focus {
  border-color: rgba(0,229,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,229,255,0.08);
}
.form-input:focus::placeholder { opacity: 0; }

/* ---- PULSE ANIMATION ---- */
@keyframes pulse-cyan {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,255,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(0,229,255,0); }
}
.pulse-dot {
  animation: pulse-cyan 2s infinite;
}

/* ---- FLOATING PARTICLES ---- */
@keyframes float-particle {
  0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-120px) translateX(30px); opacity: 0; }
}

/* ---- HERO TYPE ANIMATION ---- */
@keyframes typeIn {
  from { width: 0; }
  to { width: 100%; }
}

/* ---- ORBIT ANIMATION ---- */
@keyframes orbit {
  from { transform: rotate(0deg) translateX(70px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(70px) rotate(-360deg); }
}

/* ---- SCROLL INDICATOR ---- */
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.4; }
}
.scroll-indicator { animation: scrollBounce 2s ease infinite; }

/* ---- TAG PILL ---- */
.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.2);
  color: var(--cyan);
}

/* ---- GLITCH ANIMATION ---- */
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0); }
}

/* Responsive helpers */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
