/* ============================================
   PORTFOLIO WEBSITE — Custom Styles
   ============================================ */

/* ---- Animations ---- */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pulse-slow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in       { animation: fade-in 0.6s ease-out both; }
.animate-fade-in-up    { animation: fade-in-up 0.6s ease-out both; }
.animate-float         { animation: float 3s ease-in-out infinite; }
.animate-pulse-slow    { animation: pulse-slow 4s ease-in-out infinite; }
.animate-slide-up      { animation: slide-up 0.6s ease-out both; }

.delay-100  { animation-delay: 0.1s; }
.delay-200  { animation-delay: 0.2s; }
.delay-300  { animation-delay: 0.3s; }
.delay-400  { animation-delay: 0.4s; }
.delay-500  { animation-delay: 0.5s; }
.delay-1000 { animation-delay: 1s; }

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

/* ---- Navigation ---- */
.nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  border-radius: 0.5rem;
  transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover {
  color: #fff;
  background-color: rgba(30, 41, 59, 0.5);
}
.nav-link.active {
  color: #818cf8;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1rem;
  height: 2px;
  background: #818cf8;
  border-radius: 9999px;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  border-radius: 0.5rem;
  transition: color 0.2s, background-color 0.2s;
}
.mobile-nav-link:hover {
  color: #fff;
  background-color: rgba(30, 41, 59, 0.5);
}

/* Navbar scroll styling */
.navbar-scrolled {
  background-color: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background-color: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  transition: all 0.2s;
}
.btn-ghost:hover {
  color: #fff;
  background-color: rgba(30, 41, 59, 0.5);
}

/* ---- Social Icons ---- */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.5);
  color: #64748b;
  transition: all 0.2s;
}
.social-icon:hover {
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.3);
  background-color: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

/* ---- Skill Cards ---- */
.skill-card {
  padding: 1.5rem;
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(30, 41, 59, 0.5);
  border-radius: 1rem;
  transition: all 0.3s;
}
.skill-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background-color: rgba(15, 23, 42, 0.8);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.skill-bar {
  width: 100%;
  height: 6px;
  background-color: rgba(30, 41, 59, 0.5);
  border-radius: 9999px;
  overflow: hidden;
}
.skill-progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 9999px;
  transition: width 1.2s ease-out;
}

/* ---- Project Cards ---- */
.project-card {
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(30, 41, 59, 0.5);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s;
}
.project-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tech-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #a5b4fc;
  font-weight: 500;
}

/* ---- Blog Cards ---- */
.blog-card {
  display: block;
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(30, 41, 59, 0.5);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s;
}
.blog-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

/* ---- Blog Category Tags ---- */
.blog-tag {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 9999px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.blog-tag:hover {
  color: #fff;
  border-color: rgba(99, 102, 241, 0.4);
  background-color: rgba(99, 102, 241, 0.1);
}
.blog-tag.active {
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.5);
  background-color: rgba(99, 102, 241, 0.15);
}

/* ---- Share Buttons ---- */
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.5);
  color: #64748b;
  transition: all 0.2s;
}
.share-btn:hover {
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.3);
  background-color: rgba(99, 102, 241, 0.1);
}

/* ---- Blog Article Prose ---- */
.prose-custom {
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 1.0625rem;
}
.prose-custom .lead {
  font-size: 1.25rem;
  color: #e2e8f0;
  line-height: 1.7;
  margin-bottom: 2rem;
  border-left: 3px solid #6366f1;
  padding-left: 1.25rem;
}
.prose-custom h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}
.prose-custom h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.prose-custom p {
  margin-bottom: 1.25rem;
}
.prose-custom a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.prose-custom a:hover {
  color: #a5b4fc;
}
.prose-custom ul, .prose-custom ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.prose-custom li {
  margin-bottom: 0.5rem;
}
.prose-custom ul li {
  list-style-type: disc;
}
.prose-custom ol li {
  list-style-type: decimal;
}
.prose-custom li::marker {
  color: #818cf8;
}
.prose-custom code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  background-color: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0.375rem;
  color: #a5b4fc;
}
.prose-custom strong {
  color: #f1f5f9;
  font-weight: 600;
}
.prose-custom blockquote {
  border-left: 3px solid #6366f1;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: #94a3b8;
  font-style: italic;
}

/* ---- Code Blocks ---- */
.code-block {
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(30, 41, 59, 0.5);
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 1.5rem 0;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: rgba(30, 41, 59, 0.3);
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 0.375rem;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:hover {
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.3);
}
.code-block pre {
  padding: 1.25rem;
  overflow-x: auto;
  margin: 0;
}
.code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #e2e8f0;
  background: none;
  border: none;
  padding: 0;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

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

/* ---- Responsive Helpers ---- */
@media (max-width: 640px) {
  .prose-custom {
    font-size: 1rem;
  }
  .prose-custom h2 {
    font-size: 1.25rem;
  }
}
