@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap");

:root {
  /* Professional color palette */
  --primary: #2563eb;
  --secondary: #475569;
  --accent: #0284c7;
  --dark: #0f172a;
  --darker: #060b18;
  --light: #f3f4f6;
  --grid-color: rgb(46, 39, 66);
  --grid-size: 50px;
  --grid-thickness: 1px;
  --scroll-offset-x: 0px;
  --scroll-offset-y: 0px;

  /* Theme gradients */
  --gradient-primary: linear-gradient(90deg, var(--primary), var(--accent));
  --gradient-bg: linear-gradient(135deg, var(--darker), var(--dark));
  --card-bg: rgba(17, 24, 39, 0.6);
  --card-border: rgba(2, 132, 199, 0.2);
  --card-hover-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--dark);
  color: var(--light);
  scroll-behavior: smooth;
  position: relative;
}

/* Enhanced Grid background with subtle grid */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: linear-gradient(
      var(--grid-color) var(--grid-thickness),
      transparent var(--grid-thickness)
    ),
    linear-gradient(
      90deg,
      var(--grid-color) var(--grid-thickness),
      transparent var(--grid-thickness)
    );
  background-size: var(--grid-size) var(--grid-size);
  background-position: calc(var(--scroll-offset-x)) calc(var(--scroll-offset-y));
  opacity: 0.6;
  pointer-events: none;
  animation: gridSlide 30s linear infinite;
  transition: background-position 0.1s ease-out;
}

/* Grid reveal animation on initial load */
.grid-revealed::before {
  animation: gridReveal 1s ease-out forwards, gridSlide 15s linear infinite;
}

@keyframes gridReveal {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
}

/* Enhanced vignette effect with purple tint */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(15, 23, 42, 0) 0%,
    var(--dark) 80%,
    rgba(15, 13, 29, 1) 100%
  );
  pointer-events: none;
}

@keyframes gridSlide {
  0% {
    background-position: calc(var(--scroll-offset-x) + 0px)
      calc(var(--scroll-offset-y) + 0px);
  }
  100% {
    background-position: calc(var(--scroll-offset-x) + var(--grid-size))
      calc(var(--scroll-offset-y) + var(--grid-size));
  }
}

/* Enhanced gradient text with professional colors */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 15px rgba(37, 99, 235, 0.1);
}

/* Navigation enhancements */
.nav-link {
  position: relative;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--light);
}

.nav-link:hover::after {
  width: 100%;
}

/* Card styling with glass effect */
.card-glass {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  backdrop-filter: blur(12px);
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px 0 rgba(37, 99, 235, 0.1);
  transition: box-shadow 0.25s cubic-bezier(0.4, 2, 0.6, 1),
    transform 0.25s cubic-bezier(0.4, 2, 0.6, 1), border-color 0.2s;
  margin-top: 10px;
}

.card-glass:hover {
  box-shadow: 0 8px 32px 0 rgba(37, 99, 235, 0.18),
    0 1.5px 8px 0 rgba(2, 132, 199, 0.1);
  transform: translateY(-4px) scale(1.035);
}

/* Project card enhancements */

#project-sidebar {
  margin-top: 50px;
}

/* Hide all project details by default */
.project-details {
  display: none;
  position: absolute;
  inset: 0;
  max-width: 100%;
  margin: 0;
  padding-top: 80px;
}

.project-details:target {
  display: block !important;
  z-index: 1;
}

.project-details.active {
  display: block;
}

.project-details:hover {
  transition: transform 0.3s ease-in-out;
  transform: translateY(-4px) scale(1.035);
}

/* Show Cobalt by default when nothing is targeted */
body:not(:has(.project-details:target)) #project-podpal {
  display: block !important;
  z-index: 1;
}

/* Hover effect for project thumbnails */
.project-thumbnail {
  transition: transform 0.3s ease;
}

.project-thumbnail:hover {
  transform: scale(1.05);
}

/* Hide all dots by default */
.dot {
  display: none;
}

/* Default button style */
.project-link {
  background: transparent;
  color: #e0e7ef;
  border: 2px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s,
    box-shadow 0.18s, transform 0.18s;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hover and focus effect */
.project-link:hover {
  background: rgba(59, 130, 246, 0.13);
  color: #60a5fa;
  border-color: #60a5fa;
  box-shadow: 0 2px 12px 0 rgba(59, 130, 246, 0.1);
  outline: none;
  transform: translateY(-2px) scale(1.03);
}

/* Selected tab */
.project-link:active {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid #3b82f6;
  transform: translateY(-1px) scale(1.03);
}

/* Project image spacing fix */
.project-details img {
  height: 200px;
  object-fit: cover;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

/* Project container spacing fix */
.project-details .p-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.25rem;
}

/* Skill badge enhancements */
.skill-badge {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(2, 132, 199, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block; /* Add this line */
  margin: 0 0.25rem 0.5rem 0; /* Add some spacing between badges */
  min-width: 0; /* Prevent stretching */
  max-width: 100%;
  white-space: nowrap;
}

.skill-badge:hover {
  transform: scale(1.08);
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: 0 2px 12px 0 rgba(59, 130, 246, 0.18);
}

.skills-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1.5px solid rgba(59, 130, 246, 0.13);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  border-radius: 1.25rem;
}

/* --- Responsive Projects Section --- */
@media (max-width: 1024px) {
  #project-sidebar {
    width: 100% !important;
    margin-top: 0;
    margin-bottom: 1.5rem;
  }
  #project-view {
    width: 100% !important;
    min-height: 0 !important;
    position: static;
  }
  .project-details {
    position: static;
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  #projects {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    padding-top: 1.5rem !important;
    padding-bottom: 2rem !important;
  }
  .section-title {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
  }
  #project-sidebar {
    margin-bottom: 1rem;
  }
  .project-details img {
    height: 130px !important;
  }
  .project-details .p-6 {
    padding: 1rem 0.5rem !important;
  }
  .skill-badge {
    font-size: 0.85rem !important;
    padding: 0.25rem 0.75rem !important;
  }
}

/* Make sure project links are full width on mobile */
@media (max-width: 640px) {
  .project-link {
    width: 100%;
    justify-content: flex-start;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
  }
  #project-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  #project-sidebar li {
    width: 48%;
  }
}

/* Certificate card enhancements */
/* Certificate card enhancements */
.certificate-card {
  transition: all 0.3s ease;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.certificate-card:hover {
  transform: translateY(-5px);
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: var(--card-hover-shadow);
}

/* Auto-scroll animation */
@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-225%);
  } /* ✅ Scroll full width */
}

.animate-marquee {
  animation: marquee 35s linear infinite; /* ⏱️ Adjust speed here */
}

@media (max-width: 640px) {
  .animate-marquee {
    animation-duration: 10s !important; /* Faster on mobile */
  }
}

/* Education section enhancements */
.college-photo {
  transition: all 0.5s ease;
  position: relative;
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.college-photo:hover {
  transform: scale(1.01);
  border-color: rgba(37, 99, 235, 0.3);
}

.college-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(34, 40, 56, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0.5rem;
  padding: 1rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(37, 99, 235, 0.2);
  pointer-events: none;
}

.college-photo:hover .college-info {
  opacity: 1;
  pointer-events: auto;
}

.college-photo:focus .college-info,
.college-photo:focus-within .college-info {
  opacity: 1;
  pointer-events: auto;
}

.college-photo:focus {
  outline: none;
}

/* Contact form enhancements 
.contact-input {
    background-color: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(2, 132, 199, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.contact-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
    outline: none;
    background-color: rgba(30, 41, 59, 0.6);
}*/

.contact-input {
  width: 100%;
  padding: 1.25rem 1rem 0.5rem 1rem;
  background-color: rgba(30, 41, 59, 0.5);
  color: #fff;
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  outline: none;
  resize: none;
  backdrop-filter: blur(4px);
  position: relative;
}

.contact-input:focus {
  border-color: rgba(56, 189, 248, 1);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.contact-label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  font-size: 0.875rem;
  color: #94a3b8;
  pointer-events: none;
  transition: all 0.2s ease-in-out;
}

.contact-input:focus + .contact-label,
.contact-input:not(:placeholder-shown) + .contact-label {
  top: 0.3rem;
  left: 0.75rem;
  font-size: 0.75rem;
  color: #38bdf8;
}

/* Form notification popups */
.form-popup {
  position: fixed;
  top: 6rem;
  right: -400px;
  padding: 1rem;
  width: 20rem;
  border-radius: 0.5rem;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  transition: all 0.5s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.form-popup.show {
  right: 20px;
}

/* Social icons */
.social-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: #1e293b;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-3px) scale(1.1);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
  color: #e2e8f0;
}

.section-title::after {
  content: "";
  position: absolute;
  width: 60%;
  height: 3px;
  bottom: -8px;
  left: 0;
  background: linear-gradient(to right, #3b82f6, #06b6d4);
  border-radius: 3px;
}

/* Animation enhancements */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.floating {
  animation: float 3s ease-in-out infinite;
}

/* Primary button */
.btn-primary {
  background: linear-gradient(to right, #3b82f6, #06b6d4);
  color: white;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  z-index: -1;
  transition: opacity 0.3s ease;
  opacity: 0;
  filter: brightness(1.1) saturate(1.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover::before {
  opacity: 1;
}

/* Section backgrounds */
section {
  position: relative;
}

section:nth-child(even) {
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.7),
    rgba(15, 23, 42, 0.9)
  );
}

/* Code styling */
code,
pre {
  font-family: "Fira Code", monospace;
}

/* Accent glow elements */
.accent-glow {
  position: absolute;
  background: radial-gradient(
    circle at center,
    rgba(37, 99, 235, 0.1) 0%,
    transparent 70%
  );
  width: 30vw;
  height: 30vw;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.accent-glow.top-right {
  top: -15vw;
  right: -15vw;
}

.accent-glow.bottom-left {
  bottom: -15vw;
  left: -15vw;
}

/* Hide scrollbar */
/* Hide scrollbar cross-browser */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

#carousel {
  scrollbar-width: none; /* Firefox */
}
#carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

#carouselDots .dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  cursor: pointer;
}
