html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Nunito", sans-serif;
}

body {
  padding: 0;
  line-height: 1.5;
  background: #0f2649;
}
body .noscroll {
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: white;
}

.main-font {
  font-family: "Nunito", sans-serif;
}

.text-center {
  text-align: center;
}

.my-1 {
  margin: 1rem 0;
}

.mx-1 {
  margin: 0 0.5rem;
}

.h-100 {
  height: 100%;
}

.container {
  max-width: 1200px;
  padding: 1.5rem 1.5rem;
  margin: auto;
  overflow: hidden;
  transition: all 0.3s ease;
}

.text-blue {
  color: #3b82f6;
}

.text-white {
  color: white;
}

.text-grey {
  color: #3b82f6;
}

.text-dark-grey {
  color: #2e3031;
}

.bg-blue {
  background-color: #3b82f6;
}

.bg-dark-grey {
  background-color: #2e3031;
}

.bg-white {
  background-color: white;
}

.btn-blue-outline, .btn-dark, .btn-blue, .btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  transition: all 0.3s;
  border-radius: 3px;
  border: none;
  cursor: pointer;
}

.btn-blue {
  color: white;
  background-color: #3b82f6;
  border: 2px solid #3b82f6;
}
.btn-dark {
  color: white;
  background-color: #181a1b;
}
.btn-blue-outline {
  color: #3b82f6;
  background-color: transparent;
  border: 2px solid #3b82f6;
}
.btn-blue:hover {
  transition: all 0.3s ease;
  background: #0b63f3;
  border: 2px solid #0b63f3;
}
.btn-blue-outline:hover {
  color: white;
  background-color: #3b82f6;
}
.btn-small {
  padding: 0.5rem 1rem;
}

#backToTopBtn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 0.5rem 0.9rem;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}
#backToTopBtn.show {
  opacity: 1;
  visibility: visible;
}

.section-subtext {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.btn-email {
  --primary: #3b82f6;
  --primary-dark: #0455d8;
  --primary-darkest: #013281;
  --shadow: rgba(0, 0, 0, 0.3);
  --text: #fff;
  --text-opacity: 1;
  --success: #3b82f6;
  --success-x: -12;
  --success-stroke: 14;
  --success-opacity: 0;
  --border-radius: 3;
  --overflow: hidden;
  --x: 0;
  --y: 0;
  --rotate: 0;
  --plane-x: 0;
  --plane-y: 0;
  --plane-opacity: 1;
  --trails: rgba(59, 130, 246, 0.15);
  --trails-stroke: 57;
  --left-wing-background: var(--primary);
  --left-wing-first-x: 0;
  --left-wing-first-y: 0;
  --left-wing-second-x: 50;
  --left-wing-second-y: 0;
  --left-wing-third-x: 0;
  --left-wing-third-y: 100;
  --left-body-background: var(--primary);
  --left-body-first-x: 51;
  --left-body-first-y: 0;
  --left-body-second-x: 51;
  --left-body-second-y: 100;
  --left-body-third-x: 0;
  --left-body-third-y: 100;
  --right-wing-background: var(--primary);
  --right-wing-first-x: 49;
  --right-wing-first-y: 0;
  --right-wing-second-x: 100;
  --right-wing-second-y: 0;
  --right-wing-third-x: 100;
  --right-wing-third-y: 100;
  --right-body-background: var(--primary);
  --right-body-first-x: 49;
  --right-body-first-y: 0;
  --right-body-second-x: 49;
  --right-body-second-y: 100;
  --right-body-third-x: 100;
  --right-body-third-y: 100;
  display: block;
  cursor: pointer;
  position: relative;
  border: 0;
  padding: 8px 0;
  min-width: 100px;
  text-align: center;
  margin: 0;
  line-height: 24px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  background: none;
  outline: none;
  color: var(--text);
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-email .plane,
.btn-email .trails {
  pointer-events: none;
  position: absolute;
}
.btn-email .plane {
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  filter: drop-shadow(0 3px 6px var(--shadow));
  transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) rotate(calc(var(--rotate) * 1deg)) translateZ(0);
}
.btn-email .plane .left,
.btn-email .plane .right {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  opacity: var(--plane-opacity);
  transform: translate(calc(var(--plane-x) * 1px), calc(var(--plane-y) * 1px)) translateZ(0);
}
.btn-email .plane .left:before, .btn-email .plane .left:after,
.btn-email .plane .right:before,
.btn-email .plane .right:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  border-radius: calc(var(--border-radius) * 1px);
  transform: translate(var(--part-x, 0.4%), var(--part-y, 0)) translateZ(0);
  z-index: var(--z-index, 2);
  background: var(--background, var(--left-wing-background));
  clip-path: polygon(calc(var(--first-x, var(--left-wing-first-x)) * 1%) calc(var(--first-y, var(--left-wing-first-y)) * 1%), calc(var(--second-x, var(--left-wing-second-x)) * 1%) calc(var(--second-y, var(--left-wing-second-y)) * 1%), calc(var(--third-x, var(--left-wing-third-x)) * 1%) calc(var(--third-y, var(--left-wing-third-y)) * 1%));
}
.btn-email .plane .left:after {
  --part-x: -1%;
  --z-index: 1;
  --background: var(--left-body-background);
  --first-x: var(--left-body-first-x);
  --first-y: var(--left-body-first-y);
  --second-x: var(--left-body-second-x);
  --second-y: var(--left-body-second-y);
  --third-x: var(--left-body-third-x);
  --third-y: var(--left-body-third-y);
}
.btn-email .plane .right:before {
  --part-x: -1%;
  --z-index: 4;
  --background: var(--right-wing-background);
  --first-x: var(--right-wing-first-x);
  --first-y: var(--right-wing-first-y);
  --second-x: var(--right-wing-second-x);
  --second-y: var(--right-wing-second-y);
  --third-x: var(--right-wing-third-x);
  --third-y: var(--right-wing-third-y);
}
.btn-email .plane .right:after {
  --part-x: 0;
  --z-index: 1;
  --background: var(--right-body-background);
  --first-x: var(--right-body-first-x);
  --first-y: var(--right-body-first-y);
  --second-x: var(--right-body-second-x);
  --second-y: var(--right-body-second-y);
  --third-x: var(--right-body-third-x);
  --third-y: var(--right-body-third-y);
}
.btn-email .trails {
  display: block;
  width: 33px;
  height: 64px;
  top: -4px;
  left: 16px;
  fill: none;
  stroke: var(--trails);
  stroke-linecap: round;
  stroke-width: 2;
  stroke-dasharray: 57px;
  stroke-dashoffset: calc(var(--trails-stroke) * 1px);
  transform: rotate(68deg) translateZ(0);
}
.btn-email span {
  display: block;
  position: relative;
  z-index: 4;
  opacity: var(--text-opacity);
}
.btn-email span.success {
  z-index: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  transform: translateX(calc(var(--success-x) * 1px)) translateZ(0);
  opacity: var(--success-opacity);
  color: var(--success);
}
.btn-email span.success svg {
  display: inline-block;
  vertical-align: top;
  width: 16px;
  height: 16px;
  margin: 4px 8px 0 0;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14px;
  stroke: var(--success);
  stroke-dashoffset: calc(var(--success-stroke) * 1px);
}

.blue-link-underline {
  color: #e7e7e7;
  border-bottom: 1px solid #0b63f3;
}

.flex {
  display: flex;
}

.white-image {
  filter: brightness(0) invert(1);
}

@media screen and (max-width: 999px) {
  .hide-for-mobile {
    display: none;
  }
}

@media screen and (min-width: 1000px) {
  .hide-for-desktop {
    display: none;
  }     
}

/* Full viewport sections */
#header,
#projects,
#experience,
#skills,
#education,
#contact {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

header {
  background: #0f2649;
  background-size: cover;
  min-height: 100vh;
  position: relative;
  padding: 0;
  margin: 0;
}
header #particles-js {
  height: 80vh;
  position: relative;
}
header #particles-js canvas {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* place canvas behind nav and hero */
}
header nav {
  width: 100%;
}
header nav .nav-container {
  position: relative;
  display: flex;
  justify-content: space-between;
}
header nav .nav-container #logo {
  margin: auto 0;
  z-index: 10;
}
header nav .nav-container #logo img {
  width: 250px;
}
header nav .nav-container .nav-links {
  z-index: 1000;
}
header nav .nav-container .nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  position: relative;
}
header nav .nav-container .nav-links a {
  text-decoration: none;
  letter-spacing: 2px;
  color: white;
}
header nav .nav-container .nav-links li {
  list-style: none;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  padding: 0.5rem 0;
}

/* Dropdown styles */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-toggle .dropdown-arrow {
  font-size: 0.6rem;
  margin-left: 0.2rem;
  transition: transform 0.3s ease;
  position: relative;
  top: -1px;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1a1a2e;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  list-style: none;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1.5rem;
  color: #e6e6e6;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  white-space: nowrap;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #4db5ff;
  padding-left: 1.7rem;
}

header .mobile-menu {
  position: relative;
  z-index: 1000;
}
header .mobile-menu .container {
  padding-top: 0;
}
header .mobile-menu .container .mobile-menu-links ul {
  justify-content: center;
  align-items: center;
  list-style-type: none;
}
header .mobile-menu .container .mobile-menu-links ul li {
  margin: 0rem 1rem;
}
header .mobile-menu .container .mobile-menu-links ul .link::after {
  content: "";
  position: relative;
  display: block;
  width: 0;
  height: 2px;
  top: 3px;
  margin: auto;
  background: #3b82f6;
  transition: width 0.3s ease;
}
header .mobile-menu .container .mobile-menu-links ul .link:hover::after {
  width: 100%;
}
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

/* Target the canvas element created by particles.js */
#particles-js > canvas {
  pointer-events: none !important;
}

header .hero {
  position: relative; /* Make sure z-index works */
  z-index: 5;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  pointer-events: none; /* Allow mouse events to pass through to particles */
  width: 100%;
  padding: 2rem;
}

/* Ensure text is visible on top of particles */
header .hero h1,
/* Hero Section Layout */
.hero-container {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0;
  width: fit-content; /* wraps exactly around profile and intro */
  box-sizing: border-box;
  position: absolute;
  top: 40%;
  left: 60%;
  transform: translate(-80%, -50%);
}


.profile-picture-container.hidden {
  opacity: 0;
  pointer-events: none;
}

.profile-picture {
  width: 100%;
  height: auto;
  border-radius: 50%;
  border: 5px solid #f6f6f6;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.profile-picture:hover {
  transform: scale(1.03);
}

/* Hero Content Styles */
.hero-content {
  position: relative;
  z-index: 4;
  padding: 0;
  max-width: 600px;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.5s ease-in-out 0.1s, transform 0.5s ease-in-out 0.1s;
  align-self: center;
  justify-self: start;
  color: #ffffff; /* Ensures text is white by default */
  width: 100%;
  font-size: 25px;
}

#student {
  color: #ffffff; /* White text for better contrast */
  line-height: 1.6;
  margin: 1rem 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); /* Adds subtle shadow for better readability */
  font-size: 20px;
}

#student a {
  color: #37ff33; /* Light blue for links to stand out */
  text-decoration: none;
  transition: color 0.3s ease;
}

.hero-content.hidden {
  opacity: 0;
  transform: translateX(20px);
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 2rem;
  }
  
  .profile-picture-container {
    width: 300px;
    margin: 0 auto 2rem;
    padding: 0;
  }
  
  .hero-content {
  position: relative;
  z-index: 4;
    padding: 0.25rem 0; /* reduced on mobile as well */
    text-align: center;
    max-width: 100%;
  }
  
  .hero-btns {
    justify-content: center;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Re-enable pointer events for interactive elements */
header .hero a,
header .hero button {
  pointer-events: auto;
}

/* Profile picture styles */
.profile-picture-container {
  position: relative;
  width: 400px;
  aspect-ratio: 1 / 1;
  padding: 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  z-index: 4;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-right: 4rem;
  align-self: center;
  justify-self: start;
}

.profile-picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.profile-picture-container:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.profile-picture-container:hover .profile-picture {
  transform: scale(1.1);
}

/* Class to hide profile picture when scrolled */
.profile-picture-container.hidden {
  opacity: 0 !important;
  pointer-events: none;
  transform: scale(0.2) !important;
}

/* Main Navigation Styles - Fixed Position */
.main-navigation {
  position: fixed !important;
  top: 15px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 43% !important;
  min-width: 370px; /* Prevent nav from becoming too narrow */
  max-width: 600px; /* Prevent nav from becoming too wide */
  background: rgba(64, 90, 137, 0.98) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 10000 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
  pointer-events: auto !important;
  margin: 0 !important;
  border: none !important;
  min-height: 44px;
  border-radius: 25px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s ease !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem; /* Add some horizontal padding */
  opacity: 1;
  visibility: visible;
}

.main-navigation.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-20px) !important;
}

/* Ensure no parent elements are hiding the navigation */
body, html {
  overflow-x: hidden;
}

/* Add padding to the body to account for fixed header */
body {
  padding-top: 100px; /* Increased to account for the oval nav positioning */
}

/* Make sure header has proper spacing */
header {
  padding-top: 70px; /* Same as body padding-top */
}

/* Image Slider */
.image-slider {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background-color: #f5f5f5;
  padding: 20px;
  box-sizing: border-box;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
  width: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
  backface-visibility: hidden;
  perspective: 1000px;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  position: relative;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.prev {
  transform: translateX(-100%) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.next {
  transform: translateX(100%) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.slide img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.98);
  opacity: 0.95;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.slide.active img {
  transform: scale(1);
  opacity: 1;
  transition-delay: 0.1s;
}

.slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: #333;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.slider-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.slider-btn:active {
  transform: translateY(-50%) scale(0.95);
  transition-duration: 0.2s;
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  width: fit-content;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: #3b82f6;
}

/* Projects Section */
.projects {
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  background-color: #f9f9f9;
  position: relative;
  min-height: 100vh;
  overflow-y: auto;
}

.projects-subsection {
  margin-bottom: 4rem;
}

.projects-subsection:last-child {
  margin-bottom: 0;
}

.subsection-title {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #3498db;
  display: inline-block;
  font-weight: 600;
}

.projects h2 {
  margin-bottom: 3rem;
  text-align: center;
}

.projects .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}

/* Company Logo Styles */
.company-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.company-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Experience Section */
.experience {
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  background-color: #f9f9f9;
  position: relative;
  min-height: 100vh;
  overflow-y: auto;
}

.experience .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}

.experience .section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: #2d3748;
}

/* Timeline Styles */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 20px;
  width: 100%;
  box-sizing: border-box;
}

.timeline::before {
  content: '';
  position: absolute;
  width: 2px;
  background-color: #e2e8f0;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 20px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
  margin: 0;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 70px;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 70px;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #3b82f6;
  top: 30px;
  z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -10px;
}

.timeline-date {
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.9rem;
}

.timeline-content {
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.timeline-content h3 {
  margin: 0 0 0.5rem 0;
  color: #2d3748;
  font-size: 1.4rem;
}

.timeline-content h4 {
  margin: 0 0 1rem 0;
  color: #4a5568;
  font-size: 1.1rem;
  font-weight: 500;
}

.timeline-content p {
  margin: 0 0 1rem 0;
  color: #4a5568;
  line-height: 1.6;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  justify-content: flex-start;
  align-items: center;
}

.hero-btns .btn-blue,
.hero-btns .btn-blue-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  min-width: 120px;
  text-align: center;
}

.hero-btns .btn-blue {
  background-color: #3b82f6;
  color: white;
  border: 2px solid #3b82f6;
}

.hero-btns .btn-blue-outline {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.hero-btns .btn-blue:hover {
  background-color: #2563eb;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-btns .btn-blue-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .hero-btns {
    justify-content: center;
    gap: 1rem;
  }
  
  .hero-btns .btn-blue,
  .hero-btns .btn-blue-outline {
    padding: 0.7rem 1.2rem;
    min-width: 110px;
    font-size: 0.95rem;
  }
}

.skills-tags span {
  background-color: #ebf5ff;
  color: #3b82f6;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Responsive Timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 80px;
    padding-right: 20px;
    text-align: left !important;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
    padding-left: 80px;
  }
  
  .timeline-dot {
    left: 20px !important;
    right: auto !important;
  }
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1000;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-links {
  display: flex;
  justify-content: space-around;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  gap: 0.1rem; /* Slightly increased gap for better spacing */
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links li {
  margin: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
  position: relative;
}

/* Navigation icons */
.nav-link i {
  display: none; /* Hide all icons */
}

/* Adjust navigation for small screens */
@media screen and (max-width: 480px) {
  .nav-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem !important;
  }
  
  .main-navigation {
    padding: 0.6rem 0.5rem !important;
    min-height: 50px;
  }
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: clamp(0.7rem, 1vw, 0.9rem); /* Responsive font size */
  font-weight: 500;
  padding: 0.4rem 0.5rem; /* Slightly increased padding for better touch targets */
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  position: relative;
  text-align: center;
  margin: 0;
  letter-spacing: 0.15px;
  line-height: 1.1;
  flex: 1; /* Allow links to grow and fill available space */
  min-width: 0; /* Allow text truncation */
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link:hover,
.nav-link:focus {
  color: #fff;
  background: rgba(30, 59, 138, 0.9); /* Dark blue background */
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(30, 59, 138, 0.5); /* Stronger blue shadow */
  outline: none;
}

.nav-link.active {
  color: #3b82f6;
  font-weight: 600;
  position: relative;
}

.nav-link i {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

/* Active state for navigation links */
.nav-link.active {
  color: #3b82f6;
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: #3b82f6;
  border-radius: 50%;
}

/* Mobile active state */
.mobile-link.active {
  color: #3b82f6;
  font-weight: 700;
}

/* Responsive Design for Navigation */
@media screen and (max-width: 1200px) {
  .main-navigation {
    width: 55% !important;
  }
  .nav-link {
    padding: 0.35rem 0.4rem;
  }
}

@media screen and (max-width: 992px) {
  .main-navigation {
    width: 70% !important;
    padding: 0.4rem 0.6rem !important;
  }
  
  .nav-link {
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    padding: 0.3rem 0.35rem;
  }
}

@media screen and (max-width: 768px) {
  .main-navigation {
    width: 85% !important;
    padding: 0.4rem 0.6rem !important;
  }
  
  .nav-link {
    font-size: clamp(0.65rem, 1.1vw, 0.75rem);
    padding: 0.3rem 0.35rem;
  }
  
  .nav-links {
    gap: 0.05rem; /* Reduce gap further on small screens */
  }
}

@media screen and (max-width: 576px) {
  .main-navigation {
    width: 95% !important;
    min-width: 280px !important; /* Slightly smaller min-width for very small screens */
    padding: 0.35rem 0.5rem !important;
  }
  
  .nav-link {
    font-size: 0.7rem;
    padding: 0.3rem 0.25rem;
    letter-spacing: 0; /* Remove letter spacing on small screens */
  }
  
  .nav-links {
    gap: 0; /* Remove gap on very small screens */
  }
}

@media screen and (max-width: 400px) {
  .main-navigation {
    width: 95% !important;
    min-width: 260px;
    padding: 0.3rem 0.4rem !important; /* Reduced horizontal padding */
  }
  
  .nav-link {
    font-size: 0.74rem;
    padding: 0.2rem 0.25rem; /* Reduced horizontal padding */
  }
}

/* Mobile Menu */
.mobile-menu {
  display: none;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .nav-links {
    max-width: 80%;
  }
}

@media (max-width: 768px) {
  .main-navigation {
    display: none;
  }
  
  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(24, 26, 27, 0.95);
    z-index: 1000;
    padding: 1rem 0;
  }
  
  .mobile-menu-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .mobile-menu-links li {
    margin: 0.25rem 0.5rem;
  }
  
  .mobile-link {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: block;
  }
  
  .mobile-link:hover {
    color: #3b82f6;
    background: rgba(255, 255, 255, 0.1);
  }
}

/* Make sure navigation is above particles and profile picture */
#nav {
  position: relative;
  z-index: 1000;
}
header .hero h1,
header .hero p {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin: 0.5rem 0;
}
header .hero h1,
header .hero h2 span {
  letter-spacing: 2px;
  white-space: nowrap;
  text-align: center;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: bold;
}
header .hero p {
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1.6;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  font-weight: 400;
  margin: 1rem 0;
  max-width: 800px;
  margin: 0 auto;
  padding: 0.5rem;
}
header .hero p .blue-link-underline {
  color: #3783ff;
}
header .hero .hero-btns {
  white-space: nowrap;
  text-align: center;
  margin-top: 1rem;
}
header .socials {
  position: absolute;
  bottom: 40%;
  left: -125px;
  z-index: 10;
}
header .socials ul {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
header .socials ul li {
  transition: 0.3s;
  width: 100%;
  display: flex;
  justify-content: end;
  font-size: 1.5rem;
  width: 100%;
  height: 100%;
}
header .socials ul li a {
  text-align: right;
  height: 100%;
  width: 100%;
  padding: 15px 20px;
}
header .socials ul li a i {
  font-size: 1.75rem;
  margin-left: 1.5rem;
}
header .socials ul li:hover {
  transform: translateX(115px);
}
header .scroll-btn-container {
  position: absolute;
  width: 100%;
  background: red;
  bottom: 150px;
}
header .scroll-btn-container div {
  display: flex;
  justify-content: center;
  width: 100%;
}
header .scroll-btn-container div a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
header .scroll-btn-container div a span {
  display: block;
  height: 20px;
  width: 20px;
  border-bottom: 2px solid #3b82f6;
  border-right: 2px solid #3b82f6;
  transform: rotate(45deg);
  margin: -20px 0;
  animation: animate 2s infinite;
}
header .scroll-btn-container div a span:nth-child(2) {
  animation-delay: -0.2s;
}
header .scroll-btn-container div a span:nth-child(3) {
  animation-delay: -0.4s;
}
@keyframes animate {
  0% {
    opacity: 0;
    transform: rotate(45deg) translate(-20px, -20px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translate(20px, 20px);
  }
}
header .seperator-skew {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  width: 100%;
  overflow: hidden;
}
header .seperator-skew svg {
  position: absolute;
  bottom: 0;
}
header .seperator-skew svg .fill-white {
  fill: white;
}

@media screen and (max-width: 999px) {
  header nav .container {
    padding-bottom: 0.75rem;
  }
  header nav .nav-container {
    justify-content: center;
  }
  header .hero {
    top: 55%;
  }
  header .socials {
    display: none;
  }
}
@media screen and (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem 1rem;
    min-height: auto;
    height: auto;
  }
  
  .profile-picture-container {
    margin: 0 auto 2rem;
  }
  
  .hero {
    width: 100%;
  }
  header nav .nav-container #logo img {
    width: 200px;
  }
}
@media screen and (max-width: 500px) {
  header nav .nav-container #logo {
    font-size: 1.5rem;
  }
  header nav .mobile-menu .container .mobile-menu-links ul li {
    margin: 0 0.5rem;
  }
  header .hero span {
    max-width: 100%;
  }
  header .hero p {
    width: 100%;
  }
}
@media screen and (min-height: 900px) {
  header {
    min-height: 70vh;
  }
  header #particles-js {
    height: 70vh;
  }
}
.projects {
  background: white;
  padding: 3rem 0;
}
.projects h2,
.projects h2 span {
  text-align: center;
  margin-bottom: 3rem;
  font-weight: bold;
}
.projects .project-row {
  display: flex;
  margin: 1.5rem 0;
  padding: 1.5rem 0;
}
.projects .project-row .project-left {
  width: 50%;
  margin-right: 2rem;
}
.projects .project-row .project-left img {
  width: 100%;
  border: 1px solid lightgray;
}
.projects .project-row .project-right {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.projects .project-row .project-right h3 {
  font-size: 1.25rem;
}
.projects .project-row .project-right .tech-stack-list {
  display: flex;
  flex-wrap: wrap;
  list-style-type: none;
  margin-top: 1rem;
}
.projects .project-row .project-right .tech-stack-list p {
  margin-right: 1rem;
}
.projects .project-row .project-right .tech-stack-list li {
  margin-right: 20px;
  font-size: 1.5rem;
}
.projects .project-row .project-right .project-links {
  margin-top: 1rem;
}
.projects .project-row #webscraper {
  background-image: url("../img/top10songs.JPG");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-transition: background-image 0.2s ease-in-out;
  transition: background-image 0.2s ease-in-out;
}
.projects .project-row #webscraper:hover {
  background-image: url("../img/top10songs.gif");
}

@media screen and (max-width: 860px) {
  .projects .project-row {
    display: flex;
    margin: 1.5rem 0;
    flex-direction: column;
  }
  .projects .project-row .project-left {
    width: 100%;
  }
  .projects .project-row .project-right {
    width: 100%;
  }
}
@media screen and (max-width: 500px) {
  .project-left {
    min-height: 200px;
  }
}
@media screen and (min-width: 501px) and (max-width: 700px) {
  .project-left {
    min-height: 300px;
  }
}
@media screen and (min-width: 701px) and (max-width: 859px) {
  .project-left {
    min-height: 350px;
  }
}
.education {
  background: white;
  padding-bottom: 3rem;
}
.education .container {
  max-width: 900px;
}
.education .container h2 {
  text-align: center;
  color: black;
  margin-bottom: 1rem;
  font-size: 2rem;
}
.education .container .education-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 0.15rem 0.6rem rgba(43, 52, 56, 0.15);
  padding: 40px;
  border-radius: 3px;
}
.education .container .education-card > *:last-child {
  margin-top: 40px;
}
@media (max-width: 500px) {
  .education .container .education-card {
    padding: 20px;
  }
}
.education .container .education-card .education-card-column {
  display: flex;
}
.education .container .education-card .education-card-column .card-column-image {
  flex: 0 0 20%;
}
.education .container .education-card .education-card-column .card-column-image img {
  width: 100%;
}
.education .container .education-card .education-card-column .card-column-large {
  flex: 0 0 80%;
  padding-left: 1.5rem;
}
.education .container .education-card .education-card-column .card-column-large > * {
  margin: 0.25rem 0;
}
.education .container .education-card .education-card-column .card-column-large h4 {
  font-weight: normal;
}
.education .container .education-card .education-card-column .card-column-large ul {
  padding-left: 1.5rem;
}
.education .container .education-card .education-card-column .card-column-large hr {
  border: 0;
  border-top: 1px solid #eee;
  margin-top: 40px;
}

/* Skills Section */
.skills {
  background: #0f2649;
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 0; /* Lower z-index to stay below navigation */
}

.skills canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Ensure particles are behind content */
  pointer-events: none;
  opacity: 0.7; /* Slightly transparent for better readability */
}

.skills h2,
.skills h2 span {
  text-align: center;
  margin-bottom: 3rem;
  font-weight: bold;
}
.skills .container {
  position: relative;
  z-index: 2; /* Higher than particles but below navigation */
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0; /* Add some padding */
  background: rgba(15, 38, 73, 0.8); /* Slightly transparent background for better contrast */
}
.skills .skills-icons {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}
.skills .skills-icons svg {
  margin: 0.5rem;
  width: 90px;
}
@media (max-width: 420px) {
  .skills .skills-icons svg {
    width: 70px;
  }
}
.skills .skills-icons li {
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1rem;
  margin: 1rem;
}
@media (max-width: 420px) {
  .skills .skills-icons li {
    margin: 1rem 0.75rem;
  }
}
.skills .skills-icons li .aws-logo {
  background: white;
  padding: 10px;
  border-radius: 3px;
}
.skills .skills-icons li:hover {
  transform: scale(1.3);
}
.skills .seperator-skew-top {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 150px;
  width: 120%;
  overflow: hidden;
}
.skills .seperator-skew-top svg {
  position: absolute;
  top: 0;
  transform: scaleY(-1) scaleX(-1);
}
.skills .seperator-skew-top svg .fill-white {
  fill: white;
}
.skills .seperator-skew-bottom {
  position: absolute;
  bottom: -0.5px;
  left: 0;
  right: 0;
  height: 150px;
  width: 120%;
  overflow: hidden;
}
.skills .seperator-skew-bottom svg {
  position: absolute;
  bottom: 0;
}
.skills .seperator-skew-bottom svg .fill-white {
  fill: white;
}

.contact {
  background: white;
  padding: 3rem 0;
}
.contact .section-title {
  margin-bottom: 2rem;
  text-align: center;
}
.contact .card-container {
  display: flex;
  justify-content: space-around;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.contact .card-container .card {
  background: #fff;
  width: 260px;
  margin: 20px;
  padding: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  box-shadow: 0 0.15rem 0.6rem rgba(43, 52, 56, 0.15);
  border-radius: 3px;
}
.contact .card-container .card i {
  font-size: 3.5rem;
  color: #3b82f6;
  margin-bottom: 1rem;
  transition: 0.4s;
}
.contact .card-container .card i:hover {
  transform: translateY(-20%);
}
.contact .card-container .card > * {
  margin: 0.5rem;
}
.contact form {
  max-width: 600px;
  margin: 0 auto;
  border-radius: 3px;
  box-shadow: 0 0.15rem 0.6rem rgba(43, 52, 56, 0.15);
  padding: 2rem;
}
.contact form h2 {
  text-align: center;
  margin: 1.5rem 0;
}
.contact form .form-group input {
  margin: 0.75rem 0;
  width: 100%;
  border-radius: 3px;
  border: 1px solid #afafaf;
  padding: 0.75rem;
  font-size: 1rem;
}
.contact form .form-group input:focus {
  outline: none;
}
.contact form .form-group textarea {
  width: 100%;
  border-radius: 3px;
  margin: 0.75rem 0;
  border: 1px solid #afafaf;
  padding: 0.75rem;
  font-size: 1rem;
  resize: vertical;
}
.contact form .form-group textarea:focus {
  outline: none;
}
.contact form #status {
  width: 100%;
  text-align: center;
  margin: 0 auto;
  border-radius: 3px;
  color: #00b700;
}
.contact form #status.success {
  color: #00b700;
  animation: status 4s ease forwards;
}
.contact form #status.error {
  color: red;
  animation: status 4s ease forwards;
}
@keyframes status {
  0% {
    opacity: 1;
    pointer-events: all;
  }
  90% {
    opacity: 1;
    pointer-events: all;
  }
  100% {
    opacity: 0;
    pointer-events: none;
  }
}

.footer {
  background: #00245d;
  padding: 1.5rem 0;
  color: white;
}
.footer canvas {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}
.footer .footer-flex {
  display: flex;
  justify-content: space-between;
}
.footer .footer-flex #logo-footer {
  width: 200px;
}
.footer .footer-flex .top-scroll-button {
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 35px;
  text-align: center;
  border: 3px solid white;
  border-radius: 50%;
  transition: 0.3s;
}
.footer .footer-flex .top-scroll-button:hover {
  color: #3b82f6;
  border: 3px solid #3b82f6;
}
.footer .footer-flex .footer-icon-links a {
  margin-left: 2rem;
  transition: 0.3s;
}
.footer .footer-flex .footer-icon-links a:hover {
  color: #3b82f6;
}
.footer .footer-flex .footer-icon-links a i {
  transition: 0.3s;
}
.footer .footer-flex .footer-icon-links a i:hover {
  transform: translateY(-20%);
}

@media screen and (max-width: 500px) {
  .footer .footer-flex {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .footer .footer-flex .top-scroll-button {
    margin-top: 2rem;
  }
  .footer .footer-flex .footer-icon-links {
    margin-top: 2rem;
  }
  .footer .footer-flex .footer-icon-links a {
    margin: 0 1rem;
  }
}
/* Custom style for SweetAlert2 pop-up icons */
.swal2-icon.no-border {
  border: none !important;
  font-size: 50px; /* Makes the Font Awesome icon bigger */
  line-height: 1.6em;
}