/* LIGHT / DARK MODE */
:root {
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --text-light: #212529;
  --text-dark: #eaeaea;
  --bg-light: #f8f9fa;
  --bg-dark: #181a1b;
  --card-light: #ffffff;
  --card-dark: #242628;
  --border-light: #dee2e6;
  --border-dark: #333;
}

body.light-mode {
  background-color: var(--bg-light);
  color: var(--text-light);
}
body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

body.dark-mode footer {
  background-color: #202224 !important;
}
body.dark-mode .card {
  background-color: var(--card-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-dark);
}
body.dark-mode .btn-outline-primary {
  color: var(--text-dark);
  border-color: #bbb;
}
body.dark-mode .btn-outline-primary:hover {
  background-color: #444;
}
body.dark-mode .text-muted {
  color: #a0a0a0 !important;
}
body.dark-mode .bg-section {
  background-color: #1e1f21;
}
body.dark-mode .project-image-placeholder {
  background-color: #2a2c2e !important;
}
body.dark-mode .certificate-item {
  background-color: #2a2c2e;
  border: 1px solid var(--border-dark);
}
body.dark-mode .bg-light {
  background-color: #2a2c2e !important;
  color: var(--text-dark);
}

/* Navigation */
.navbar {
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.navbar-blur {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.dark-mode .navbar-blur {
  background-color: rgba(24, 26, 27, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  background-clip: text;            
  -webkit-background-clip: text;    
  -webkit-text-fill-color: transparent;
}

.navbar-nav .nav-link {
  color: #343a40; 
  font-weight: 500;
  position: relative;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #eaeaea; 
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

body.dark-mode .navbar-nav .nav-link {
  color: #eaeaea;
}

body.dark-mode .navbar-nav .nav-link:hover,
body.dark-mode .navbar-nav .nav-link.active {
  color: #eaeaea;
}


/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  position: relative;
  padding-top: 6rem !important;
}
.profile-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) border-box;

  -webkit-mask: 
    linear-gradient(#fff 0 0) padding-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;

  mask: 
    linear-gradient(#fff 0 0) padding-box, 
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Buttons */
.btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: all 0.5s ease;
}
.btn:hover::before {
  left: 100%;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Project Cards */
.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Section background */
.bg-section {
  background-color: rgba(0, 0, 0, 0.03);
}
body.dark-mode .bg-section {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Project Items */
.project-item {
  padding: 2rem;
  border-radius: 12px;
  background: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  margin-bottom: 3rem;
  transition: all 0.3s ease;
}
.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
body.dark-mode .project-item {
  background-color: var(--card-dark);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
body.dark-mode .project-item:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Certificate Items */
.certificate-item {
  background: white;
  border: 1px solid #eee;
  height: 100%;
  transition: all 0.3s ease;
}
.certificate-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
body.dark-mode .certificate-item {
  background-color: var(--card-dark);
  border-color: var(--border-dark);
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}
.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

#modeToggle {
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
#modeToggle:hover {
  transform: rotate(15deg);
}

/* Tech Stack Items */
.tech-item {
  transition: all 0.3s ease;
  border: 1px solid #eee;
  background: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.tech-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.tech-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
}
.tech-item span {
  font-weight: 500;
}
body.dark-mode .tech-item {
  background-color: var(--card-dark);
  border-color: var(--border-dark);
}

/* Timeline in About Me */
.timeline {
  position: relative;
  margin-bottom: 1.5rem;
}
.timeline-badge {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.timeline::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 17px;
  bottom: -15px;
  width: 2px;
  background: #dee2e6;
}
.timeline:last-child::after {
  display: none;
}
body.dark-mode .timeline::after {
  background: #444;
}

/* Custom AWS icon color */
.bi-cloud-fill {
  font-size: 2.2rem;
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.5em 0.8em;
  transition: all 0.3s ease;
}
.badge:hover {
  transform: scale(1.05);
}

/* Project links */
.project-links {
  margin-top: 1.5rem;
}

/* Active nav link */
.navbar-nav .nav-link.active {
  font-weight: bold;
  color: var(--primary-color) !important;
}
body.dark-mode .navbar-nav .nav-link.active {
  color: #bb86fc !important;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  bottom: 20px;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section .btn {
    margin-bottom: 10px;
  }
  
  .project-item {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .certificate-item {
    margin-bottom: 1.5rem;
  }
  
  .navbar-nav {
    text-align: center;
    padding: 1rem 0;
  }
  
  .navbar-nav .nav-link {
    margin: 0.2rem 0;
  }
  
  .back-to-top {
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
}

/* About Me Section Improvements */
.lead {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.timeline {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-badge {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.timeline::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 24px;
  bottom: -10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  z-index: 1;
}

.timeline:last-child::after {
  display: none;
}

.timeline-content {
  padding-bottom: 10px;
}

.timeline-content h5 {
  color: var(--primary-color);
  font-weight: 600;
}

.badge {
  font-size: 0.75rem;
  font-weight: 500;
}

.bg-light.text-dark {
  background: linear-gradient(135deg, #f9f871, #ffc75f) !important;
}

/* Dark mode adjustments */
body.dark-mode .bg-light.text-dark {
  background: linear-gradient(135deg, #5e5e2a, #8a612c) !important;
  color: white !important;
}

body.dark-mode .timeline::after {
  background: linear-gradient(to bottom, #bb86fc, #3700b3);
}

/* Project Image Container */
.project-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 300px;
}

.project-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-image-container:hover img {
  transform: scale(1.05);
}

.project-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.project-image-container:hover .project-image-overlay {
  opacity: 1;
}

/* Responsive adjustments for project images */
@media (max-width: 992px) {
  .project-image-container {
    height: 250px;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  .project-image-container {
    height: 200px;
  }
}