/* Understanding what z-index does was the best thing to ever happen to me */

:root {
  --bg-dark-midnight: #050510;
  --accent-red: #FF2E2E;
  --text-light: #f0f0f0;
  --card-bg: #101020;
}

body {
  background-color: var(--bg-dark-midnight);
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Text Selection */
::selection {
  background: rgba(13, 110, 253, 0.3);
  /* Bootstrap primary with transparency */
  color: white;
}

a {
  color: var(--accent-red);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

a:hover {
  color: #ff6666;
}

.btn,
.card,
.nav-link {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.btn:active {
  transform: scale(0.98);
}

/* Overriding Bootstrap Utilities for the Theme */
.bg-light {
  background-color: rgba(10, 10, 26, 0.8) !important;
  backdrop-filter: blur(10px);
}

.bg-dark {
  background-color: #000000 !important;
}

.text-muted {
  color: #a0a0a0 !important;
}

.btn-primary {
  background-color: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #cc0000;
  border-color: #cc0000;
  color: white;
}

.btn-outline-primary {
  color: var(--accent-red);
  border-color: var(--accent-red);
}

.btn-outline-primary:hover {
  background-color: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
}

.btn-outline-dark {
  color: #fff;
  border-color: #fff;
}

.btn-outline-dark:hover {
  background-color: #fff;
  color: #000;
}

.navbar-dark .navbar-brand {
  color: #fff;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--accent-red);
}





#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

footer,
#hero {
  position: relative;
  z-index: 1;
}

main {
  position: relative;
  z-index: 3;
}

#hero {
  position: relative;
  overflow: hidden;
  background-color: transparent;
}

#hero .hero-overlay {
  display: none;
}

#hero .hero-content {
  position: relative;
  z-index: 2;
}

.card {
  background-color: var(--card-bg);
  color: var(--text-light);
}

.bg-body-tertiary {
  background-color: rgba(16, 16, 32, 0.8) !important;
}


.rotating-text-wrapper {
  display: inline-block;
  position: relative;
  height: 1.5em;
  vertical-align: bottom;
  overflow: hidden;
  border: 2px solid var(--accent-red);
  padding: 0 10px;
  border-radius: 4px;
  background-color: rgba(255, 46, 46, 0.1);
  box-shadow: 0 0 10px rgba(255, 46, 46, 0.3);
}

#rotating-text {
  display: inline-block;
  transition: opacity 0.5s ease, transform 0.5s ease;
  color: var(--accent-red);
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 0 5px rgba(255, 46, 46, 0.5);
}

#rotating-text.fade-out {
  opacity: 0;
  transform: translateY(20px);
}

#rotating-text.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.project-hero {
  height: 60vh;
  background: #111;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.project-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  background: linear-gradient(to top, var(--bg-dark-midnight), transparent);
  padding-bottom: 8rem;
  padding-top: 8rem;
}

.project-main-image {
  margin-top: -100px;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 3;
}

.bounce-container {
  width: 100%;
  position: relative;
  perspective: 1000px;
  min-height: 400px;
}

.project-card {
  width: 300px;
  flex-shrink: 0;
  margin-left: -60px;
  margin-right: -60px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    z-index 0s linear 0.1s;
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  position: relative;
  z-index: 1;
  transform-origin: center bottom;
  box-shadow: -10px 0 20px rgba(0, 0, 0, 0.3);
}

.project-card:first-child {
  margin-left: 0;
}

.project-card:last-child {
  margin-right: 0;
}

.project-card:hover {
  transform: scale(1.1) translateY(-20px) rotate(0deg) !important;
  z-index: 100;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    z-index 0s linear;
}

.project-card:has(~ .project-card:hover) {
  transform: translateX(-40px) rotate(-5deg) scale(0.95);
}

.project-card:hover~.project-card {
  transform: translateX(40px) rotate(5deg) scale(0.95);
}

.card-img-top-wrapper {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .card-img-top {
  transform: scale(1.1);
}

@media (max-width: 992px) {
  .bounce-container {
    display: flex;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 2rem 1rem;
    scroll-snap-type: x mandatory;
    perspective: none;
  }

  .project-card {
    width: 280px;
    margin: 0 1rem;
    scroll-snap-align: center;
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .project-card:hover {
    transform: none !important;
    z-index: 1;
  }

  .project-card:has(~ .project-card:hover),
  .project-card:hover~.project-card {
    transform: none !important;
  }
}

.skills-image,
.about-image {
  width: 100%;
  border-radius: 1rem;
}

#projects,
#contact,
#about,
#skills {
  background-color: transparent !important;
}

.form-check-input:checked {
  background-color: var(--accent-red);
  border-color: var(--accent-red);
}

.form-check-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 0.25rem rgba(255, 46, 46, 0.25);
}


.glare-btn {
  position: relative;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.4);
  border: 2px solid var(--accent-red);
  color: var(--text-light);
  z-index: 1;
  transition: all 0.3s ease;
}

.glare-btn:hover {
  background-color: rgba(255, 46, 46, 0.1);
  border-color: #ff6666;
  color: var(--text-light);
}

.glare-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.3) 75%,
      rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  z-index: 2;
  pointer-events: none;
}

.glare-btn:hover::before {
  transform: translateX(200%) skewX(-20deg);
  transition: transform 0.5s ease-in-out;
}

/* Timeline Styles */
.timeline-dot {
  width: 12px;
  height: 12px;
  left: -6px;
  top: 5px;
  border: 2px solid var(--bg-dark-midnight);
}

.timeline-content {
  padding-bottom: 3rem;
}

.timeline-entry:last-child .timeline-content {
  border-left: 2px solid transparent !important;
}

@media (max-width: 768px) {
  .timeline-entry .text-md-end {
    text-align: left !important;
    margin-bottom: 0.5rem;
  }

  .timeline-content {
    border-left: 2px solid #6c757d !important;
    padding-left: 1.5rem !important;
    margin-left: 0.5rem;
  }

  .timeline-dot {
    left: -7px;
  }
}

/* Entry Animations */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card Hover Effects */
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Specific fix for project cards to maintain their specific hover logic */
.project-card:hover {
  transform: scale(1.1) translateY(-20px) rotate(0deg) !important;
}