/* ═══════════════════════════════════════════
   CUSTOM STYLES — Portfolio
   ═══════════════════════════════════════════ */

/* --- Base & Scrollbar --- */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f0f13;
}
::-webkit-scrollbar-thumb {
  background: #2a2a36;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

/* --- Navbar --- */
.nav-scrolled {
  background: rgba(15, 15, 19, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(42, 42, 54, 0.6);
}

.nav-link {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-link:hover,
.nav-link.active {
  color: #fff;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #6366f1;
  transition: width 0.3s;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* --- Hero Background --- */
.hero-bg {
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(99, 102, 241, 0.12), transparent 70%);
}

.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* --- Typing Cursor --- */
.typed-cursor {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* --- Fade-Up Animation --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.6s ease forwards;
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Section Heading --- */
.section-heading {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3rem;
  position: relative;
}
.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #6366f1;
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* --- Skill Tags --- */
.skill-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0.5rem;
  transition: all 0.2s;
}
.skill-tag:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

/* --- Project Cards --- */
.project-card {
  background: #16161d;
  border: 1px solid #2a2a36;
  border-radius: 0.75rem;
  transition: all 0.3s;
  overflow: hidden;
}
.project-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(99, 102, 241, 0.06);
}

/* --- Timeline --- */
.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 4px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6366f1;
  border: 3px solid #0f0f13;
  z-index: 1;
}

@media (min-width: 768px) {
  .timeline-dot {
    left: 50%;
    transform: translateX(-50%);
  }
  .timeline-item:nth-child(even) .timeline-dot {
    left: 50%;
  }
}

.timeline-card {
  background: #16161d;
  border: 1px solid #2a2a36;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: border-color 0.3s;
}
.timeline-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

/* --- Social Links --- */
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  transition: all 0.2s;
}
.social-link:hover {
  background: #6366f1;
  color: #fff;
  transform: translateY(-2px);
}

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

/* --- Form Error State --- */
input.error,
textarea.error {
  border-color: #f87171 !important;
}
