/* ─── Root & Theme Variables ─────────────────────────────── */
:root {
  --accent: #0ea5e9;
  --accent-light: #38bdf8;
  --accent-dark: #0284c7;
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #6366f1; border-radius: 3px; }

/* ─── Selection ─────────────────────────────────────────── */
::selection { background: rgba(14,165,233,0.3); color: #fff; }

/* ─── Gradient Text ─────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Grid Pattern ──────────────────────────────────────── */
.grid-pattern {
  background-image:
    linear-gradient(rgba(14,165,233,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,165,233,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ─── Profile Ring ──────────────────────────────────────── */
.profile-ring {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8, #10b981);
  padding: 4px;
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(14,165,233,0.4);
}

/* ─── Blob Animation ────────────────────────────────────── */
.blob {
  animation: blobFloat 8s ease-in-out infinite;
}
@keyframes blobFloat {
  0%, 100% { transform: scale(1) translate(0,0); }
  33% { transform: scale(1.1) translate(20px, -20px); }
  66% { transform: scale(0.9) translate(-20px, 20px); }
}

/* ─── Float Animation ───────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }

/* ─── Spin Slow ─────────────────────────────────────────── */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.animate-spin-slow { animation: spin 20s linear infinite; }

/* ─── Glass Card ────────────────────────────────────────── */
.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s ease;
}
.light .glass-card,
html:not(.dark) .glass-card {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.glass-card:hover { border-color: rgba(14,165,233,0.3); }

/* ─── Hover Lift ────────────────────────────────────────── */
.hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(14,165,233,0.15); }

/* ─── Pill Label ────────────────────────────────────────── */
.pill-label {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(14,165,233,0.15);
  color: #38bdf8;
  border: 1px solid rgba(14,165,233,0.3);
}

/* ─── Primary Button ────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary > * { position: relative; z-index: 1; }

/* ─── Icon Box ──────────────────────────────────────────── */
.icon-box {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(14,165,233,0.2), rgba(16,185,129,0.2));
  color: #38bdf8;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ─── Tech Chip ─────────────────────────────────────────── */
.tech-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(14,165,233,0.1);
  color: #38bdf8;
  border: 1px solid rgba(14,165,233,0.2);
  transition: all 0.2s ease;
}
.tech-chip:hover {
  background: rgba(14,165,233,0.25);
  border-color: rgba(14,165,233,0.5);
  transform: translateY(-2px);
}

/* ─── Social Big Btn ────────────────────────────────────── */
.social-big-btn {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14,165,233,0.1);
  color: #38bdf8;
  border: 1px solid rgba(14,165,233,0.2);
  font-size: 1rem;
  transition: all 0.3s ease;
}
.social-big-btn:hover {
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(14,165,233,0.4);
}

/* ─── Form Input ────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: #94a3b8;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e2e8f0;
}
html:not(.dark) .form-input {
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.12);
  color: #1e293b;
}
.form-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}
.form-input::placeholder { color: #64748b; }

/* ─── Navbar ────────────────────────────────────────────── */
#navbar.scrolled {
  background: rgba(15,23,42,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(14,165,233,0.15);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
html:not(.dark) #navbar.scrolled {
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}
.nav-link {
  color: #94a3b8;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}
html:not(.dark) .nav-link { color: #64748b; }
.nav-link:hover, .nav-link.active { color: #38bdf8; background: rgba(14,165,233,0.08); }

/* ─── Filter Buttons ────────────────────────────────────── */
.filter-btn {
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(14,165,233,0.2);
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}
.filter-btn:hover, .filter-btn.active {
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(14,165,233,0.4);
}

/* ─── Project Card ──────────────────────────────────────── */
.project-card {
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
}
.project-card:hover { transform: translateY(-8px); box-shadow: 0 30px 60px rgba(14,165,233,0.2); }
.project-card .card-img { transition: transform 0.5s ease; }
.project-card:hover .card-img { transform: scale(1.05); }
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.95) 0%, transparent 60%);
  transition: all 0.3s ease;
}

/* ─── Skills Bar ────────────────────────────────────────── */
.skill-bar-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
html:not(.dark) .skill-bar-track { background: rgba(0,0,0,0.08); }
.skill-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #0ea5e9, #10b981);
  width: 0%;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Timeline ──────────────────────────────────────────── */
.timeline-item {
  padding-left: 3.5rem;
  position: relative;
}
.timeline-dot {
  position: absolute;
  left: 1.75rem;
  top: 1.5rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(14,165,233,0.2);
  z-index: 1;
}

/* ─── Reveal Animation ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Light Mode overrides ──────────────────────────────── */
html:not(.dark) body {
  background-color: #f8fafc;
  color: #1e293b;
}
html:not(.dark) #home { background-color: #f8fafc; }
html:not(.dark) .grid-pattern {
  background-image:
    linear-gradient(rgba(14,165,233,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,165,233,0.06) 1px, transparent 1px);
}

/* ─── Splash ─────────────────────────────────────────────── */
#splash.hidden-splash {
  opacity: 0;
  pointer-events: none;
}

/* ─── Skill Bar Glow ─────────────────────────────────────── */
.skill-bar-fill { box-shadow: 0 0 8px rgba(14,165,233,0.5); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .profile-ring { width: 220px; height: 220px; }
}
/* ─── Modal & Slideshow ──────────────────────────────────── */
#project-modal.active {
  opacity: 1;
  pointer-events: auto;
}
#project-modal.active > div:nth-child(2) {
  transform: scale(1);
}
.modal-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.modal-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.slide-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}
.slide-indicator.active {
  background: #0ea5e9;
  width: 24px;
  border-radius: 4px;
}
.light #project-modal > div:nth-child(2) {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
}
.light #project-modal #modal-title {
  color: #0f172a;
}
.light #project-modal .modal-info-area {
  background: #ffffff;
}
.light #project-modal #modal-desc {
  color: #475569;
}
.light #project-modal .modal-close {
  background: rgba(0,0,0,0.05);
  color: #1e293b;
}
.light #project-modal .modal-close:hover {
  background: #ef4444;
  color: white;
}
