
/* Base Styles */
:root {

  /*--primary-color: #9b87f5;*/
  --primary-color: #1a1d7a;
  
  --primary-dark: #579df2;
  --primary-light: #8ac6ff;
  --primary-ultra-light: #c9e8ff;
  --secondary-color: #42495c;
  --text-color: #333333;
  --text-color-light: #6e6e6e;
  --background-color: #ffffff;
  --background-alt: #f8f9fa;
  --border-color: #e5e7eb;
  --card-shadow: rgba(0, 0, 0, 0.05) 0px 2px 8px;
  --modal-overlay: rgba(0, 0, 0, 0.7);
  --navbar-bg: rgba(255, 255, 255, 0.85);
  --navbar-shadow: rgba(0, 0, 0, 0.07) 0px 2px 10px;
  --icon-color: var(--primary-color);
  --section-spacing: 80px;
  --transition-speed: 0.3s;
  --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Dark mode toggle icons */
  --light-icon-display: inline-block;
  --dark-icon-display: none;
}

/* Dark Mode Styles */
.dark-mode {
  --primary-color: #7885fa;
  --primary-dark: #7480e8;
  --primary-light: #96aee3;
  --primary-ultra-light: #0e1136;
  --secondary-color: #e0e0e0;
  --text-color: #f0f0f0;
  --text-color-light: #b0b0b0;
  --background-color: #0c0d14;
  --background-alt: #12131c;
  --border-color: #333333;
  --card-shadow: rgba(0, 0, 0, 0.2) 0px 2px 8px;
  --modal-overlay: rgba(0, 0, 0, 0.75);
  --navbar-bg: rgba(18, 18, 18, 0.85);
  --navbar-shadow: rgba(0, 0, 0, 0.3) 0px 2px 10px;
  --icon-color: var(--primary-color);
  
  /* Dark mode toggle icons */
  --light-icon-display: none;
  --dark-icon-display: inline-block;
}


/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color var(--transition-speed) var(--transition-timing),
              color var(--transition-speed) var(--transition-timing),
              border-color var(--transition-speed) var(--transition-timing),
              box-shadow var(--transition-speed) var(--transition-timing),
              opacity var(--transition-speed) var(--transition-timing),
              transform var(--transition-speed) var(--transition-timing);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Ensures content is not hidden behind fixed navbar */
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
  opacity: 1;
  transition: opacity 0.5s var(--transition-timing);
}

/* Add this class to body when page is loading */
body.loading {
  opacity: 0;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-speed) var(--transition-timing);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  transform: translateZ(0); /* Hardware acceleration for smoother transitions */
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Theme Toggle Switch - Updated positioning */
.theme-toggle {
  position: fixed;
  top: 80px; /* Below navbar on desktop */
  right: 20px;
  z-index: 999; /* Below navbar but above content */
  transition: all 0.3s ease;
}

.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

.theme-switch {
  display: inline-block;
  height: 30px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
}

.slider:before {
  background-color: white;
  bottom: 4px;
  content: "";
  height: 22px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 22px;
  border-radius: 50%;
  z-index: 2;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(30px);
}

.slider.round {
  border-radius: 34px;
}

.light-icon {
  color: #f9d71c;
  font-size: 14px;
  position: relative;
  margin-left: 9px;
}

.dark-icon {
  color: #ffffff;
  font-size: 14px;
  position: relative;
  margin-right: 9px;
}

/* Nav Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--navbar-bg);
  box-shadow: var(--navbar-shadow);
  z-index: 1000;
  backdrop-filter: blur(10px);
  transition: all var(--transition-speed) var(--transition-timing);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}

.nav-links ul {
  display: flex;
}

.nav-links li {
  margin: 0 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem;
  border-radius: 5px;
  transition: all var(--transition-speed) var(--transition-timing);
}

.nav-link:hover, 
.nav-link:focus {
  color: var(--primary-color);
  background-color: var(--primary-ultra-light);
}

.nav-icon {
  margin-right: 8px;
  color: var(--icon-color);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  /*font-size: 14px;*/
  font-weight: bold;
  color: white;
  text-decoration: none;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(100, 100, 255, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  /*background-color: var(--primary-dark);*/
  transform: translateY(-2px);
  /*box-shadow: 0 5px 15px rgba(155, 135, 245, 0.3);*/
  box-shadow: 0 0 18px rgba(100, 100, 255, 0.8);
}


.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-color);
  transition: all 0.3s ease-in-out;
}


/* Mobile Sidebar Styles - Narrower width */
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -80px; /* Changed from -300px to match new width */
  width: 80px; /* Reduced from 280px to 80px */
  height: 100vh;
  background: var(--background-color);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1001;
  border-left: 1px solid var(--border-color);
}

.mobile-sidebar.active {
  right: 0;
}

.sidebar-content {
  padding: 0; /* Remove all padding */
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
}


/* Navigation links container */
.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px; /* Small gap between icons */
}

.sidebar-links li {
  margin: 0;
  width: 100%;
}

/* Adjust sidebar link padding for narrower width */
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 10px; /* Reduced horizontal padding from 30px to 10px */
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(-5px);
}

.sidebar-link i {
  font-size: 1.6rem; /* Slightly smaller icons to fit better */
  width: 24px;
  text-align: center;
}

/* Adjust close button position for narrower sidebar */
.sidebar-close {
  position: absolute;
  top: 15px; /* Slightly higher */
  right: 15px; /* Closer to edge */
  background: none;
  border: none;
  font-size: 1.3rem; /* Slightly smaller */
  color: var(--text-color);
  cursor: pointer;
  z-index: 1002;
  padding: 5px;
  transition: all 0.3s ease;
}

/* Fix hamburger positioning for small screens */
.hamburger {
  display: none;
  cursor: pointer;
  position: relative;
  z-index: 1002; /* Ensure it stays above sidebar */
  flex-shrink: 0; /* Prevent shrinking on very small screens */
  margin-left: auto; /* Push to right side */
}




/* Sections */
.section {
  padding: var(--section-spacing) 0;
  transition: background-color var(--transition-speed) var(--transition-timing);
  backface-visibility: hidden; /* Prevents flicker on some browsers */
  will-change: transform; /* Optimizes animations */
}

.section:nth-child(even) {
  background-color: var(--background-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 20px;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

.section-header h2 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 10px;
}

.experience-years {
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: normal;
}

.section-icon {
  color: var(--icon-color);
  font-size: 2rem;
  margin-bottom: 15px;
}

/* Bio Section */
/* Remove spacing from Bio section for a more compact appearance */
#bio {
  padding-top: 100px; /* Reduced padding since we removed the section header */
}

.bio-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.bio-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  border: 5px solid var(--primary-color);
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

/* Resume Button */
.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1rem;
  margin-bottom: 20px;
  background-color: #8c0712;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.resume-btn:hover {
  background-color: #f53646;
  /*color: black;*/
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(155, 135, 245, 0.3);
}

.contact-info {
  margin: 10px 0px 0px 0px;
  flex: 1;
  min-width: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.contact-item i {
  margin-right: 10px;
  color: var(--icon-color);
}

.social-links {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 5px;
  border-radius: 50%;
  background-color: var(--primary-ultra-light);
  color: var(--icon-color);
  transition: all var(--transition-speed) var(--transition-timing);
}

.social-icon:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.bio-statement {
  margin-bottom: 30px;
}

.bio-statement h2 {
  font-size: 1.8rem;
  color: var(--text-color);
  margin-bottom: 10px;
}

.bio-statement p {
  font-size: 1.2rem;
  color: var(--text-color);
}

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* Redesigned smaller service cards with icon on left */
.service-card {
  display: flex;
  align-items: center;
  padding: 15px;
  background-color: var(--background-color);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-speed) var(--transition-timing);
  cursor: pointer;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  background-color: var(--primary-ultra-light);
  margin-right: 15px;
}

.service-icon i {
  color: var(--icon-color);
  font-size: 1.3rem;
}

.service-content {
  flex: 1;
}

.service-card h3 {
  margin-bottom: 5px;
  color: var(--text-color);
  font-size: 1.1rem;
}

.service-card p {
  color: var(--text-color-light);
  font-size: 0.9rem;
  margin: 0;
}

.mobile-only {
  display: none;
}

/* Portfolio Section */
.portfolio-item h3{
  font-size: 15px;
  text-align: center;
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.filter-btn {
  margin: 0 5px 10px;
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  background-color: var(--background-color);
  color: var(--text-color);
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-timing);
}

.filter-btn:hover, 
.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
}

/* ADD this new rule for the portfolio container */
.portfolio-container {
  max-height: 70vh; /* Limit height to 70% of viewport */
  overflow-y: auto;
  padding-right: 10px; /* Space for scrollbar */
  margin-bottom: 20px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Reduced from 300px */
  gap: 15px; /* Reduced from 20px */
}

.portfolio-item {
  position: relative;
  border-radius: 8px; /* Reduced from 10px */
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-timing);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--transition-timing);
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.3)); /* Darker gradient */
  padding: 20px;
  color: white;
  opacity: 1; /* Always visible instead of 0 */
  transition: all var(--transition-speed) var(--transition-timing);
}

.portfolio-item:hover .overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.5)); /* Even darker on hover */
}

/* Add play button styles */
.portfolio-item::before {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  color: white;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: all var(--transition-speed) var(--transition-timing);
  z-index: 2;
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.portfolio-item:hover::before {
  opacity: 0.6;
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(0, 0, 0, 0.6);
}


/* Portfolio Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-overlay);
  z-index: 1000;
  overflow-y: auto;
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity var(--transition-speed) var(--transition-timing);
}

.modal.show {
  opacity: 1;
}

.modal-content {
  position: relative;
  background-color: var(--background-color);
  margin: 3vh auto; /* REDUCED from 5vh to 3vh */
  padding: 20px; /* REDUCED from 30px to 20px */
  width: 85%;
  max-width: 900px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  opacity: 0;
  transition: all var(--transition-speed) var(--transition-timing);
  max-height: 94vh; /* INCREASED from 90vh to 94vh */
  overflow-y: auto;
}

.modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-color-light);
  cursor: pointer;
  transition: color var(--transition-speed) var(--transition-timing);
}

.close-modal:hover {
  color: var(--primary-color);
}

  
/*Project navigation arrows:*/
.modal-nav {
  position: fixed; /* CHANGED from absolute to fixed */
  /*top: 80%;*/
  top: 40%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8); /* DARKENED for better visibility */
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2); /* ADDED border for definition */
  width: 35px; /* INCREASED from 50px */
  height: 35px; /* INCREASED from 50px */
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px; /* INCREASED from 20px */
  transition: all 0.3s ease;
  z-index: 1002; /* INCREASED z-index to be above modal */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* ADDED shadow for depth */
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.modal-nav-prev {
  left: calc(50vw - 600px); /* CHANGED: Dynamic positioning based on viewport */
}

.modal-nav-next {
  right: calc(50vw - 600px); /* CHANGED: Dynamic positioning based on viewport */
}

.modal-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.modal-nav:disabled:hover {
  transform: translateY(-50%) scale(1);
}


.modal-body {
  display: flex;
  flex-direction: column;
  gap: 15px; /* REDUCED from 25px to 15px */
  max-width: 800px;
  margin: 0 auto;
  padding: 10px; /* REDUCED from 20px to 10px */
}

.video-container {
  width: 100%;
  height: 0;
  padding-bottom: 45%; /* Reduced from 56.25% to make it shorter */
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  margin: 10px auto; /* Center and add some margin */
  max-width: 600px; /* Reduced from 650px */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Add subtle shadow like YouTube */
}


.video-container img,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from 'cover' to 'contain' to show full video without cropping */
  background-color: #000; /* Add black background for letterboxing if needed */
}


.project-description {
  color: var(--text-color);
  line-height: 1.7;
  font-size: 1rem;
  margin-top: 5px; /* Add small top margin */
}

.modal-right h2 {
  font-size: 1.8rem;
  color: var(--text-color);
  margin-bottom: 20px;
}

.project-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail {
  display: flex;
  align-items: flex-start;
}

.detail i {
  color: var(--icon-color);
  font-size: 1.2rem;
  margin-right: 15px;
  margin-top: 4px;
}

.detail h4 {
  color: var(--text-color-light);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.detail p {
  color: var(--text-color);
}

.glow-button {
  display: inline-block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(100, 100, 255, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin: 10px;
}

.glow-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(100, 100, 255, 0.8);
}

.modal-demo-container {
  text-align: center;
  margin: 8px 0; /* Reduced margin */
}

/* Hide demo container when empty */
.modal-demo-container:empty {
  display: none;
  margin: 0;
}

/* When demo container is hidden, reduce gap */
.modal-body:has(.modal-demo-container:empty) {
  gap: 20px;
}

.modal-project-title {
  text-align: center;
  margin-bottom: 10px; /* Reduced margin */
  font-size: 1.8rem;
}


.modal-tools-section {
  margin-top: 15px;
}

.tools-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tools-header i {
  color: var(--icon-color);
  font-size: 1.2rem;
}

.tools-header h4 {
  color: var(--text-color-light);
  font-size: 1rem;
  margin: 0;
}


/* Skills Section - Updated with smaller cards and images */
.skills-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.skills-left h3,
.skills-right h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

/* New smaller skill cards layout */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.skill-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background-color: var(--background-color);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-speed) var(--transition-timing);
}

.skill-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.skill-image {
  width: 36px;
  height: 36px;
  /*border-radius: 50%;*/
  overflow: hidden;
  margin-right: 12px;
}

.skill-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skill-info h4 {
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
}

/* New smaller tool cards */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 15px;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 10px;
  border-radius: 8px;
  background-color: var(--background-color);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-speed) var(--transition-timing);
  text-align: center;
}

.tool-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tool-image {
  width: 40px;
  height: 40px;
  /*border-radius: 50%;*/
  overflow: hidden;
  margin-bottom: 8px;
}

.tool-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-item p {
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.85rem;
  margin: 0;
}

/* Timeline Section - Updated with resume details */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background-color: var(--primary-color);
}

.timeline-item {
  position: relative;
  padding-left: 50px;
  margin-bottom: 50px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--primary-color);
  left: -6.5px;
  top: 10px;
}

.timeline-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--background-color);
  margin-bottom: 15px;
  box-shadow: var(--card-shadow);
}

.company-logo {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: var(--background-alt);
}

.timeline-content {
  background-color: var(--background-alt);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.company-date {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.company-date h3 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 5px;
  margin-right: 15px;
}

.timeline-content h3 {
  font-size: 1.2rem;
  color: var(--text-color);
  margin-bottom: 5px;
}

.position {
  color: var(--text-color);
  font-size: 1.1rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.team {
  font-size: 0.9rem;
  font-weight: normal;
  color: var(--text-color-light);
}

.duration {
  display: flex;
  align-items: center;
  color: var(--text-color-light);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.duration i {
  margin-right: 8px;
  color: var(--icon-color);
}

.description-list {
  color: var(--text-color);
  line-height: 1.5;
  padding-left: 20px;
  margin-top: 15px;
}

.description-list li {
  margin-bottom: 8px;
  position: relative;
  list-style-type: disc;
}

/* Add this new rule for scrollable timeline */
.timeline-container {
  max-height: 500px; /* Adjust this value as needed */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px; /* Space for scrollbar */
  margin-right: -10px; /* Compensate for padding */
}

/* Custom scrollbar styling for better appearance */
.timeline-container::-webkit-scrollbar {
  width: 6px;
}

.timeline-container::-webkit-scrollbar-track {
  background: var(--background-color);
  border-radius: 3px;
}

.timeline-container::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
  opacity: 0.7;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
  opacity: 1;
}


/* Testimonials Section */
.testimonial-slider-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-slider {
  overflow: hidden;
  margin-bottom: 30px;
}

.testimonial-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  padding: 30px;
  background-color: var(--background-color);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  transition: opacity 0.5s var(--transition-timing), transform 0.5s var(--transition-timing);
  opacity: 0;
  display: none;
}

/* Set the first testimonial to be visible by default */
.testimonial-card:first-child {
  opacity: 1;
  display: grid;
}

.client-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
}

.testimonial-text {
  display: flex;
  flex-direction: column;
}

.testimonial-text p {
  font-style: italic;
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 1.1rem;
  line-height: 1.7;
}

.client-name {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 5px;
}

.client-position {
  color: var(--text-color-light);
  font-size: 0.9rem;
}

.testimonial-date {
  color: var(--text-color-light);
  font-size: 0.9rem;
}

.slider-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.slider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: var(--primary-ultra-light);
  color: var(--primary-color);
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-timing);
}

.slider-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.client-logos {
  margin-top: 60px;
  text-align: center;
}

.client-logos h3 {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--text-color);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.client-logo {
  padding: 15px;
  background-color: var(--background-color);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-speed) var(--transition-timing);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.client-logo:hover {
  transform: scale(1.05);
}

.client-logo img {
  max-width: 120px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
}

.client-logo p {
  color: var(--text-color);
  font-weight: 500;
}

/* Resume Modal Styles */
.resume-modal .modal-content {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  height: 85vh;
  padding-bottom: 20px;
}

#downloadResume {
  margin-top: 30px;
  margin-right: 30px;
}

.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border-color);
}

.resume-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--text-color);
}

.resume-viewer {
  flex-grow: 1;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--background-alt);
}

.resume-viewer iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background-color: white;
}

/* Footer */
footer {
  background-color: var(--background-alt);
  padding: 60px 0 30px;
  color: var(--text-color);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 30px;
}

.footer-info h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-color);
}


/* Contact Methods Styling */
.contact-methods {
  flex: 1;
  width: 100%;
  max-width: 100%;
}

.method-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  max-width: 100%;
  justify-content: center;
}

.tab-btn {
  flex: 1;
  padding: 15px 20px;
  border: none;
  background: transparent;
  color: var(--text-color-light);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-speed) var(--transition-timing);
  border-bottom: 3px solid transparent;
}

.tab-btn.active,
.tab-btn:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: var(--primary-ultra-light);
}

.tab-btn i {
  margin-right: 8px;
}

.contact-method {
  display: none;
  width: 100%;
  max-width: 100%;
}

.contact-method.active {
  display: block;
  width: 100%;
}

.contact-method h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text-color);
  text-align: center;
}

/* Calendly widget responsive adjustments */
.calendly-inline-widget {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

/* Contact Layout - Side by Side */
.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 1rem;
  width: 100%;
}

/* Map Container Styles */
.map-container {
  flex: none;
  width: 100%;
  max-width: 600px;
  margin-top: 0;
  align-self: flex-start;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--border-color, #e5e7eb);
  transition: all 0.3s ease;
}

.map-container:hover {
  box-shadow: 0 8px 30px rgba(159, 143, 213, 0.2);
  border-color: var(--primary-color, #9f8fd5);
}

#locationMap {
  height: 300px;
  width: 100%;
  min-height: 300px;
}

/* Dark theme support for map */
[data-theme="dark"] .map-container {
  border-color: #374151;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .map-container:hover {
  box-shadow: 0 8px 30px rgba(159, 143, 213, 0.3);
  border-color: #9f8fd5;
}



/*Footer form*/

.footer-form h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.form-group {
  margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: var(--background-color);
  color: var(--text-color);
  transition: all var(--transition-speed) var(--transition-timing);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(155, 135, 245, 0.2);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-top: 20px;
}

.footer-bottom .social-links {
  margin-bottom: 20px;
}

.copyright p {
  color: var(--text-color-light);
  font-size: 0.9rem;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s var(--transition-timing) both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Media Queries */

@media (max-width: 1200px) {
  .modal-nav-prev {
    left: 20px; /* FALLBACK: Fixed position for smaller screens */
  }
  
  .modal-nav-next {
    right: 20px; /* FALLBACK: Fixed position for smaller screens */
  }
}

@media (max-width: 992px) {
  .bio-content,
  .skills-content {
    grid-template-columns: 1fr;
  }
  
  .bio-left {
    margin-bottom: 30px;
  }
  
  .skills-left {
    margin-bottom: 30px;
  }
  
  .modal-body {
    grid-template-columns: 1fr
;  }

  .video-container {
      max-width: 100%;
    }
  
/*  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }*/
}


@media (max-width: 968px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-layout {
    flex-direction: row;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .map-container {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    width: auto;
    /*order: 2;*/
  }
  
  footer .contact-info {
    flex: 1;
    min-width: 200px;
  }
  
  #locationMap {
    height: 280px;
  }

  /* Center the contact methods section */
  .contact-methods {
    width: 100%;
    max-width: 100%;
  }
  
  .method-tabs {
    display: flex;
    width: 100%;
    max-width: 100%;
  }
}


@media (max-width: 820px) {
  .section {
    padding-top: 60px;
    padding-bottom: 60px;
  }
  
  #bio {
    padding-top: 80px;
  }

  .testimonial-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  

  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .method-tabs {
    flex-direction: row; /* Keep side-by-side */
    min-width: 100%; /* Remove fixed 500px constraint */
    overflow-x: auto;
  }
  
  .tab-btn {
    text-align: center;
    padding: 8px 12px;
    min-width: 120px;
    white-space: nowrap;
  }
  
  .calendly-inline-widget {
    height: 600px !important;
  }

  .contact-layout {
    flex-direction: row;
    gap: 1rem;
  }

  footer .contact-info {
    flex: 1;
    min-width: 180px;
  }

  .map-container {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    margin-top: 0;
  }

  #locationMap {
    height: 240px;
  }

  .theme-toggle {
    position: fixed;
    top: 20px;
    right: 90px; /* Moved further left to clear the narrower sidebar */
    z-index: 1003;
  }
  
  
  .hamburger {
    display: block;
    margin-right: 10px;
  }
  
  /* Hide regular nav links on mobile */
  .nav-links {
    display: none;
  }
  
  /* Ensure navbar container doesn't wrap and hamburger stays visible */
  .navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    flex-wrap: nowrap; /* Prevent wrapping */
  }
  
  /* Ensure logo doesn't take up too much space on very small screens */
  .logo {
    flex-shrink: 1;
    min-width: 0; /* Allow logo to shrink if needed */
  }
  
  .logo a {
    font-size: 1.3rem; /* Slightly smaller on mobile */
  }
  
  .cta-button {
    display: none;
  }
  
  .mobile-only {
    display: block;
    margin-top: 30px;
  }
  
  .hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .portfolio-container {
    max-height: 60vh; /* Smaller on mobile */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scroll-behavior: smooth;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Even smaller on mobile */
    gap: 12px;
  }

  .timeline-container {
    max-height: 400px; /* Smaller height on mobile */
  }

  .video-container {
    max-width: 100%;
    padding-bottom: 50%;
    margin: 8px auto; /* FURTHER REDUCED for mobile */
  }
  
  .modal-content {
    width: 95%;
    margin: 2vh auto;
    padding: 15px; /* REDUCED from 20px */
  }

  .modal-nav-prev {
    left: 10px;
  }
  
  .modal-nav-next {
    right: 10px;
  }
  
  .modal-body {
    gap: 12px; /* FURTHER REDUCED for mobile */
    padding: 8px;
  }
  
}


/* Hide sidebar on desktop */
@media (min-width: 769px) {
  .mobile-sidebar {
    display: none;
  }
}


@media (max-width: 600px) {
  .contact-layout {
    flex-direction: column;
    gap: 1.5rem;
  }

  footer .contact-info {
    order: 1;
    flex: none;
  }

  .map-container {
    order: 2;
    flex: none;
    min-width: 70%;
    max-width: 100%;
    height: 150px;
  }
  
  #locationMap {
    height: 150px;
  }
}


@media (max-width: 576px) {
/*  .portfolio-grid {
    grid-template-columns: 1fr;
  }*/
  
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  
  .logo-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }

  .services {
    grid-template-columns: 1fr;
  }
  
  .company-date {
    flex-direction: column;
  }

 .modal-nav{
    top: 30%;
  }
}

@media (max-width: 480px) {
  .portfolio-container {
    max-height: 50vh; /* Even smaller on very small screens */
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr 1fr; /* Force 2 columns on very small screens */
    gap: 10px;
  }

  .map-container {
    flex: none;
    min-width: 100%;
    max-width: 100%;
  }

  #locationMap {
    height: 180px;
  }

  .video-container {
    padding-bottom: 55%; /* Even taller on very small screens */
    margin: 5px auto;
  }
  
  .modal-body {
    gap: 10px;
    padding: 5px;
  }

}

@media (max-width: 400px) {
  .navbar .container {
    padding: 1rem 15px; /* Reduce padding on very small screens */
  }
  
  .logo a {
    font-size: 1.2rem; /* Even smaller logo text */
  }
}

