:root {
  /* Color palette */
  --bg-primary: #f5f5f5;
  --bg-secondary: #e8e8e6;
  --taupe-light: #d6d3cc;
  --taupe: #a09e92;
  --taupe-dark: #7a7872;
  --navy: #1a2a3a;
  --navy-light: #2c3e50;
  --accent: #3498db;
  --text-dark: #333333;
  --text-light: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
  
  /* Dark mode palette (fallback for components that don't check for dark-theme class) */
  --dark-bg-primary: #121212;
  --dark-bg-secondary: #1e1e1e;
  --dark-taupe-light: #4a4a4a;
  --dark-taupe: #707070;
  --dark-taupe-dark: #8f8f8f;
  --dark-accent: #5dade2;
  --dark-text-dark: #e0e0e0;
  --dark-text-light: #ffffff;
  --dark-shadow: rgba(0, 0, 0, 0.4);
  
  /* Typography */
  --font-primary: 'Poppins', sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 600;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;
  
  /* Border radius */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  
  /* Transitions */
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: 2.2rem;
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-medium);
}

p {
  margin-bottom: var(--spacing-sm);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: var(--border-radius-md);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  text-align: center;
  transition: all var(--transition-speed);
  cursor: pointer;
}

.primary-btn {
  background-color: var(--navy);
  color: var(--text-light);
  border: 2px solid var(--navy);
}

.primary-btn:hover {
  background-color: var(--navy-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px var(--shadow);
}

.secondary-btn {
  background-color: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.secondary-btn:hover {
  background-color: rgba(26, 42, 58, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px var(--shadow);
}

/* Header and Navigation */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-primary);
  box-shadow: 0 2px 10px var(--shadow);
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-speed);
}

main {
  padding-top: 60px; /* Base padding to account for fixed header */
}

.page-header {
  padding-top: 2rem; /* Additional padding for page headers */
}

.page-header .subtitle {
  margin-top: 0.5rem;
}

.fixed-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  color: var(--navy);
  margin: 0;
  font-size: 1.5rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  margin-left: var(--spacing-md);
}

.main-nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: var(--font-weight-medium);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-speed);
}

.main-nav a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--navy);
  transition: width var(--transition-speed);
}

.main-nav a:hover, .main-nav a.active {
  color: var(--navy);
}

.main-nav a:hover:after, .main-nav a.active:after {
  width: 100%;
}

.nav-cta {
  background-color: var(--navy);
  color: var(--text-light) !important;
  border-radius: var(--border-radius-md);
  padding: 0.5rem 1rem !important;
}

.nav-cta:hover {
  background-color: var(--navy-light);
}

.nav-cta:after {
  display: none;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--navy);
  cursor: pointer;
}

/* Header scroll effects */
.fixed-header.scrolled {
  padding: 0.7rem 0;
  box-shadow: 0 5px 20px var(--shadow);
  background-color: rgba(245, 245, 245, 0.95);
}

.fixed-header.header-hidden {
  transform: translateY(-100%);
}

/* Page loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.page-loader.active {
  opacity: 1;
  visibility: visible;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  position: relative;
}

.spinner-circle {
  border: 3px solid var(--taupe-light);
  border-top: 3px solid var(--navy);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hero Section */
.hero {
  padding: 10rem 0 5rem;
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--navy);
}

.hero .subtitle {
  font-size: 1.5rem;
  color: var(--taupe-dark);
  margin-bottom: var(--spacing-md);
  font-weight: var(--font-weight-light);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  position: relative;
}

.profile-photo {
  max-width: 500px; /* Increased from 420px */
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: 20px 20px 100px rgba(0, 0, 0, 0.5); /* Enhanced shadow with more opacity and blur */
  animation: float 5s ease-in-out infinite;
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

/* Enhanced Hero Section with circle background */
.hero-image-container {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: flex-end; /* Changed from center to flex-end to move content right */
  align-items: flex-start; /* Changed from center to flex-start to move content up */
  min-height: 450px;
  margin-top: -90px; /* Added negative margin to move everything up */
}

.circle-background {
  position: absolute;
  width: 800px; /* Increased circle size from 550px */
  height: 800px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--navy), var(--navy-light));
  right: -380px; /* Adjusted position */
  top: -120px; /* Changed from -120px to move higher */
  z-index: 1;
  opacity: 0.15;
  animation: float 6s ease-in-out infinite;
}

.profile-wrapper {
  position: relative;
  z-index: 2;
  margin-right: -30px; /* Pull the image slightly right */
  margin-top: 50px; /* Added to adjust vertical position */
}

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

/* Media query for responsive circle */
@media screen and (max-width: 992px) {
  .circle-background {
    width: 450px;
    height: 450px;
    right: -100px;
  }
  
  .profile-photo {
    max-width: 360px; /* Adjusted for medium screens */
  }
  
  .profile-wrapper {
    margin-right: -20px; /* Less margin on smaller screens */
  }
}

@media screen and (max-width: 768px) {
  .circle-background {
    width: 380px;
    height: 380px;
    right: -50px;
    top: -50px;
  }
  
  .profile-photo {
    max-width: 300px; /* Adjusted for small screens */
  }
  
  .profile-wrapper {
    margin-right: 0; /* No margin on very small screens */
  }
}

/* Expertise Section */
.expertise {
  padding: var(--spacing-xl) 0;
  background-color: var(--bg-secondary);
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
  color: var(--navy);
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--navy);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.expertise-card {
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  box-shadow: 0 5px 15px var(--shadow);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.expertise-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px var(--shadow);
}

.icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: var(--navy);
  color: var(--text-light);
  border-radius: 50%;
  margin-bottom: var(--spacing-sm);
}

.icon-container i {
  font-size: 1.5rem;
}

/* Featured Projects */
.featured-projects {
  padding: var(--spacing-xl) 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.project-card {
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px var(--shadow);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info {
  padding: var(--spacing-md);
}

.project-link {
  color: var(--navy);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  display: inline-flex;
  align-items: center;
  margin-top: var(--spacing-sm);
  transition: color var(--transition-speed);
}

.project-link i {
  margin-left: 5px;
  transition: transform var(--transition-speed);
}

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

.project-link:hover i {
  transform: translateX(5px);
}

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

/* Arrow icon styling for project links */
.project-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #3498db;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #2980b9;
}

.arrow-icon {
    margin-left: 6px;
    font-size: 18px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.project-link:hover .arrow-icon {
    transform: translateX(4px);
}

/* About Preview */
.about-preview {
  padding: var(--spacing-xl) 0;
  background-color: var(--bg-secondary);
}

.about-preview .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.about-content {
  max-width: 500px;
}

.about-content .section-title {
  text-align: left;
}

.about-content .section-title:after {
  left: 0;
  transform: none;
}

.bio {
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
}

.stats-container {
  display: flex;
  justify-content: space-between;
  text-align: center;
}

.stat-item {
  padding: var(--spacing-md);
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-md);
  min-width: 120px;
  box-shadow: 0 5px 15px var(--shadow);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: var(--font-weight-bold);
  color: var (--navy);
  margin-bottom: 5px;
}

.stat-label {
  color: var(--taupe-dark);
  font-size: 0.9rem;
}

/* Footer */
footer {
  background-color: var(--navy);
  color: var(--text-light);
  padding: var(--spacing-lg) 0 var(--spacing-sm);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.footer-section {
  margin-bottom: var(--spacing-md);
  min-width: 200px;
}

.footer-section h3 {
  margin-bottom: var(--spacing-sm);
  position: relative;
  display: inline-block;
}

.footer-section h3:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--accent);
}

.tagline {
  color: var(--taupe-light);
}

.social-media {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.social-media a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border-radius: 50%;
  text-decoration: none;
  transition: all var(--transition-speed);
}

.social-media a:hover {
  background-color: var(--accent);
  transform: translateY(-5px);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
  color: var(--taupe-light);
  font-size: 0.9rem;
}

/* Spacing adjustments for about page */
.personal-life-section {
    padding-top: var(--spacing-xl);
    position: relative;
}

.personal-life-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 800px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--taupe), transparent);
}

/* Style adjustments for improved profile container */
.improved-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl); /* Increased gap for better separation */
    align-items: start;
}

/* Skills Showcase - replacement for counters */
.skills-showcase {
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  box-shadow: 0 5px 15px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.skills-showcase:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var (--shadow);
}

.skills-title {
  color: var(--navy);
  margin-bottom: var(--spacing-md);
  text-align: center;
  position: relative;
  padding-bottom: var(--spacing-xs);
  font-size: 1.6rem;
}

.skills-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: var(--accent);
}

.skill-item {
  margin-bottom: var(--spacing-sm);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-weight: var(--font-weight-medium);
}

.skill-level {
  color: var(--accent);
  font-size: 0.9rem;
}

.skill-bar {
  height: 8px;
  background-color: var(--taupe-light);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--accent));
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.1, 0.5, 0.1, 1);
}

.tech-icons {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.tech-icon {
  width: 50px;
  height: 50px;
  background-color: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--navy);
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px var(--shadow);
}

.tech-icon:hover {
  transform: translateY(-5px);
  background-color: var(--navy);
  color: var(--text-light);
}

.tech-icon span {
  font-weight: var(--font-weight-bold);
  font-size: 1.2rem;
}

/* Dark theme adjustments for skills showcase */
.dark-theme .skills-showcase {
  background-color: var(--bg-secondary);
}

.dark-theme .skills-title {
  color: var(--text-light);
}

.dark-theme .tech-icon {
  background-color: var(--navy-light);
  color: var(--text-light);
}

.dark-theme .tech-icon:hover {
  background-color: var(--accent);
}

/* Tech Icons Grid - Updated Clean Version */
.tech-icons-grid {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-lg) auto;
  max-width: 100%;
}

@media screen and (max-width: 768px) {
  .tech-icons-grid {
    flex-wrap: wrap;
    gap: var(--spacing-sm);
  }
}

.tech-icon-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.tech-icon {
  width: 70px;
  height: 70px;
  background-color: var (--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--navy);
  transition: all 0.3s ease;
  margin-bottom: var(--spacing-xs);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tech-icon-wrapper:hover .tech-icon {
  transform: translateY(-8px);
  background-color: var(--navy);
  color: var(--text-light);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.tech-name {
  font-size: 0.95rem;
  font-weight: var(--font-weight-medium);
  color: var(--taupe-dark);
  margin-top: 0.5rem;
}

.letter-icon {
  font-weight: 700;
  font-size: 2.2rem;
}

.tech-description {
  margin-top: var(--spacing-md);
  color: var(--taupe-dark);
  font-size: 1rem;
  font-weight: var(--font-weight-light);
  font-style: italic;
}

/* Dark theme adjustments */
.dark-theme .skills-showcase {
  background-color: var(--bg-secondary);
}

.dark-theme .skills-title {
  color: var(--text-light);
}

.dark-theme .tech-icon {
  background-color: var(--navy-light);
  color: var(--text-light);
}

.dark-theme .tech-icon-wrapper:hover .tech-icon {
  background-color: var(--accent);
}

.dark-theme .tech-name {
  color: var(--taupe-light);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--navy);
    color: var (--text-light);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background-color: var(--accent);
    transform: translateY(-5px);
}

.dark-theme #back-to-top {
    background-color: var(--accent);
}

.dark-theme #back-to-top:hover {
    background-color: var(--taupe-light);
    color: var(--navy);
}

/* Remove scroll-to-top styles (keeping only back-to-top styles) */
.scroll-to-top {
    display: none !important; /* Hide any existing element with this class */
}

/* Updated Horizontal Timeline with Improved Layout */
.horizontal-timeline {
    padding: var(--spacing-xl) 0;
    overflow: hidden; /* Prevent any potential outer overflow */
}

.timeline-container {
    position: relative;
    padding: 60px 0 60px; /* Reduced padding to prevent cutoff */
    overflow: visible; /* Change from auto to visible to remove scrollbar */
    margin: 0;
    width: 100%; /* Ensure full width */
}

.timeline-track {
    position: absolute;
    top: 50%; /* Center the track vertically */
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--taupe-light);
    z-index: 1;
}

.timeline-events {
    display: flex;
    position: relative;
    width: 100%; /* Set width to 100% instead of min-width */
    z-index: 2;
    padding: 0;
    align-items: center; /* Align items to the center of the container */
    justify-content: space-between; /* Distribute events evenly */
}

.timeline-event {
    position: relative;
    flex: 1;
    min-width: 150px; /* Reduced from 200px to fit more items */
    max-width: 200px; /* Add maximum width to prevent overly wide items */
    padding: 0 10px; /* Reduced padding from 15px to 10px */
    display: flex;
    flex-direction: column;
}

/* Position employment items above the line - reduced margin for closer positioning */
.timeline-event.employment {
    margin-top: -135px; /* Exact same distance as education tiles (just negative) */
    margin-bottom: 135px; 
    transform: translateY(0); /* Remove transformY offset for perfect alignment */
}

/* Position education items below the line - reduced margin for closer positioning */
.timeline-event.education {
    margin-top: 135px; /* Exact same distance as employment tiles (just positive) */
    margin-bottom: -135px;
    transform: translateY(0); /* Remove transformY offset for perfect alignment */
}

/* Enhanced connection lines with animation */
.timeline-event.employment::after {
    content: '';
    position: absolute;
    bottom: -39px; /* Position to exactly touch the timeline */
    left: 50%;
    width: 3px;
    height: 39px; /* Height to precisely reach the timeline */
    background: linear-gradient(to bottom, var(--navy), var(--accent));
    z-index: 3;
    transform: translateX(-50%);
}

.timeline-event.education::before {
    content: '';
    position: absolute;
    top: -39px; /* Position to exactly touch the timeline */
    left: 50%;
    width: 3px;
    height: 39px; /* Height to precisely reach the timeline */
    background: linear-gradient(to top, var(--navy), var(--accent));
    z-index: 3;
    transform: translateX(-50%);
}

/* Timeline content adjustments for better fit */
.timeline-content {
    padding: 12px; /* Reduced padding from 15px */
    font-size: 0.95rem; /* Slightly smaller font size */
}

.timeline-title {
    font-size: 1rem; /* Slightly reduced size */
    margin-bottom: 3px;
}

.timeline-event p {
    font-size: 0.85rem; /* Smaller font for descriptions */
    margin-bottom: 3px;
}

.click-hint {
    font-size: 0.75rem; /* Smaller hint text */
}

/* NEW SHAPES ON TIMELINE INSTEAD OF DOTS/TICKS */
.timeline-tick {
    position: absolute;
    width: 14px; /* Slightly smaller for better placement */
    height: 14px;
    background-color: var(--accent);
    border: 2px solid var(--text-light);
    transform: rotate(45deg); /* Create diamond shape */
    z-index: 4;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Remove up/down movement on tile hover but keep shadow and border effects */
.timeline-event.clickable:hover .timeline-content {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

/* Remove scaling effect on tick hover but keep color change */
.timeline-event:hover .timeline-tick {
    background-color: var(--navy);
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.7);
}

/* For education event ticks specifically */
.timeline-event.education:hover .timeline-tick {
    transform: translateX(-50%) rotate(45deg) translateY(-50%);
}

/* Remove connector animation */
.timeline-connector {
    position: absolute;
    width: 3px;
    background: linear-gradient(to bottom, var(--navy), var(--accent));
    z-index: 3;
    left: 50%;
    transform: translateX(-50%);
}

/* Individual tick positioning - keep position but ensure no animations are applied */
.tick-bba, .tick-ms, .tick-phd, .tick-consultant, .tick-ga {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* ADJUST POSITION OF TIMELINE CATEGORY LABELS */
.timeline-label {
    position: absolute;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: var(--font-weight-medium);
    font-size: 0.9rem;
    box-shadow: 0 3px 10px var(--shadow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    max-width: 230px; /* Increased from 180px to fit "Employment History" without wrapping */
    white-space: nowrap; /* Prevent text wrapping */
}

.employment-label {
    top: -80px; /* Adjusted position */
    left: 30px;
    transform: translateY(0);
    animation: floatLabel 2s ease-in-out infinite;
}

.education-label {
    top: 80px; /* Moved down to avoid overlap with first education tile */
    left: 30px; /* Match the left position of employment-label for alignment */
    transform: translateY(0);
    animation: floatLabel 2s ease-in-out infinite alternate;
}

/* Hover effect for timeline ticks */
.timeline-event:hover .timeline-tick {
    background-color: var(--navy);
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.7);
}

.timeline-event.education:hover .timeline-tick {
    transform: translateX(-50%) rotate(45deg) translateY(-50%);
}

/* Responsive adjustments for even smaller screens */
@media screen and (max-width: 1200px) {
    .timeline-events {
        justify-content: flex-start; /* Allow scrolling on smaller screens */
        min-width: 800px; /* Minimum width to ensure all items show */
    }
    
    .timeline-container {
        overflow-x: auto; /* Enable horizontal scrolling for smaller screens */
    }
    
    .education-label {
        left: 30px; /* Keep consistent with employment label */
    }
}

@media screen and (max-width: 992px) {
    .timeline-event {
        min-width: 160px;
    }
    
    .timeline-event.employment {
        margin-top: -130px;
        margin-bottom: 130px;
    }
    
    .timeline-event.education {
        margin-top: 130px;
        margin-bottom: -130px;
    }
    
    .timeline-event.employment::after {
        bottom: -34px;
        height: 34px;
    }
    
    .timeline-event.education::before {
        top: -34px;
        height: 34px;
    }
    
    .timeline-event.employment .timeline-dot {
        bottom: -65px;
    }
    
    .timeline-event.education .timeline-dot {
        top: -65px;
    }
    
    /* Position ticks properly on smaller screens */
    .timeline-event.employment .timeline-tick {
        bottom: -73px;
    }
    
    .timeline-event.education .timeline-tick {
        top: -73px;
    }
}

@media screen and (max-width: 768px) {
    .timeline-event {
        min-width: 140px;
    }
    
    .timeline-title {
        font-size: 0.95rem;
    }
    
    .timeline-event.employment {
        margin-top: -120px;
        margin-bottom: 120px;
    }
    
    .timeline-event.education {
        margin-top: 120px;
        margin-bottom: -120px;
    }
    
    .timeline-event.employment::after {
        bottom: -30px;
        height: 30px;
    }
    
    .timeline-event.education::before {
        top: -30px;
        height: 30px;
    }
    
    .timeline-event.employment .timeline-dot {
        bottom: -60px;
    }
    
    .timeline-event.education .timeline-dot {
        top: -60px;
    }
    
    .education-label {
        left: 20px; /* Match employment label at smaller screens */
        top: 70px;
    }
    
    .employment-label {
        left: 20px;
    }
    
    /* Position ticks properly on mobile */
    .timeline-event.employment .timeline-tick {
        bottom: -65px;
    }
    
    .timeline-event.education .timeline-tick {
        top: -65px;
    }
}

/* Dark theme support */
.dark-theme .timeline-track {
    background-color: var(--dark-taupe-light);
}

.dark-theme .timeline-label {
    background-color: var(--dark-navy-light);
}

.dark-theme .timeline-content {
    background-color: var(--dark-bg-secondary);
    border-color: var(--dark-taupe-light);
}

.dark-theme .timeline-dot {
    box-shadow: 0 0 0 5px var(--dark-bg-primary);
}

/* Timeline Category Styling */
.timeline-category {
    margin-bottom: var(--spacing-xl);
}

.timeline-category-title {
    color: var(--navy);
    font-size: 1.4rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    position: relative;
    display: inline-block;
    border-bottom: 3px solid var(--accent);
}

.timeline-category-title i {
    margin-right: 8px;
    color: var(--accent);
}

/* Dark theme support for timeline categories */
.dark-theme .timeline-category-title {
    color: var(--text-light);
}

/* Fix modal z-index and display */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-md);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    padding: 25px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

/* Enhanced Horizontal Timeline with Professional Design */
.horizontal-timeline {
    padding: var(--spacing-xl) 0;
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.timeline-container {
    position: relative;
    padding: 120px 0 80px; /* Increased padding for better spacing */
    overflow: visible;
    margin: 0;
    width: 100%;
}

/* Enhanced timeline track with gradient and depth */
.timeline-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px; /* Thicker line */
    background: linear-gradient(to right, var(--navy), var(--accent), var(--navy));
    z-index: 1;
    transform: translateY(-50%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Add timeline markers to show progression */
.timeline-track:before, .timeline-track:after {
    content: '';
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
}

.timeline-track:before {
    left: 0;
}

.timeline-track:after {
    right: 0;
}

.timeline-events {
    display: flex;
    position: relative;
    width: 100%;
    z-index: 2;
    padding: 0;
    align-items: center;
    justify-content: space-between;
}

/* Improved timeline event styling */
.timeline-event {
    position: relative;
    flex: 1;
    min-width: 170px;
    max-width: 230px;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    z-index: 3;
}

/* More distinguished positioning for employment vs education */
.timeline-event.employment {
    margin-top: -135px; /* Exact same distance as education tiles (just negative) */
    margin-bottom: 135px; 
    transform: translateY(0); /* Remove transformY offset for perfect alignment */
}

.timeline-event.education {
    margin-top: 135px; /* Exact same distance as employment tiles (just positive) */
    margin-bottom: -135px;
    transform: translateY(0); /* Remove transformY offset for perfect alignment */
}

/* Enhanced connection lines with animation */
.timeline-event.employment::after {
    content: '';
    position: absolute;
    bottom: -39px; /* Position to exactly touch the timeline */
    left: 50%;
    width: 3px;
    height: 39px; /* Height to precisely reach the timeline */
    background: linear-gradient(to bottom, var(--navy), var(--accent));
    z-index: 3;
    transform: translateX(-50%);
}

.timeline-event.education::before {
    content: '';
    position: absolute;
    top: -39px; /* Position to exactly touch the timeline */
    left: 50%;
    width: 3px;
    height: 39px; /* Height to precisely reach the timeline */
    background: linear-gradient(to top, var (--navy), var(--accent));
    z-index: 3;
    transform: translateX(-50%);
}

/* Animation for connection lines */
@keyframes pulseConnection {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Enhanced timeline dots */
.timeline-dot {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--accent));
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 0 0 5px var(--bg-secondary), 0 0 0 8px rgba(52, 152, 219, 0.2);
    transition: all 0.4s ease;
    font-size: 1.2rem;
}

/* Position dots for employment/education items */
.timeline-event.employment .timeline-dot {
    left: 50%;
    top: auto;
    bottom: -73px;
    transform: translateX(-50%);
}

.timeline-event.education .timeline-dot {
    left: 50%;
    top: -73px;
    bottom: auto;
    transform: translateX(-50%);
}

/* Enhanced timeline content styling */
.timeline-content {
    background: linear-gradient(to bottom, var(--bg-primary) 0%, rgba(245, 245, 245, 0.95) 100%);
    border-radius: var(--border-radius-md);
    padding: 18px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(52, 152, 219, 0.2);
    position: relative;
    overflow: hidden;
}

.timeline-content:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent 30%, rgba(52, 152, 219, 0.05) 70%);
    pointer-events: none;
}

/* Improved hover effects */
.timeline-event.clickable:hover .timeline-content {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

.timeline-event:hover .timeline-dot {
    transform: translateX(-50%) scale(1.15);
    box-shadow: 0 0 0 5px var(--bg-secondary), 0 0 0 12px rgba(52, 152, 219, 0.3);
}

/* Visual distinction between employment and education */
.timeline-event.employment .timeline-content {
    border-top: 4px solid var(--navy);
}

.timeline-event.education .timeline-content {
    border-bottom: 4px solid var(--accent);
}

.timeline-date {
    display: inline-block;
    font-weight: var(--font-weight-medium);
    color: var(--text-light);
    margin-bottom: 8px;
    font-size: 0.85rem;
    background-color: var(--navy);
    padding: 3px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--navy);
    font-weight: var(--font-weight-bold);
}

.timeline-event p {
    font-size: 0.9rem;
    color: var(--taupe-dark);
    margin-bottom: 5px;
}

.click-hint {
    font-size: 0.8rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed rgba(52, 152, 219, 0.3);
}

/* Enhanced timeline tick marks */
.timeline-tick {
    position: absolute;
    width: 14px; /* Slightly smaller for better placement */
    height: 14px;
    background-color: var(--accent);
    border: 2px solid var(--text-light);
    transform: rotate(45deg); /* Create diamond shape */
    z-index: 4;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Remove up/down movement on tile hover but keep shadow and border effects */
.timeline-event.clickable:hover .timeline-content {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

/* Remove scaling effect on tick hover but keep color change */
.timeline-event:hover .timeline-tick {
    background-color: var(--navy);
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.7);
}

/* For education event ticks specifically */
.timeline-event.education:hover .timeline-tick {
    transform: translateX(-50%) rotate(45deg) translateY(-50%);
}

/* Remove connector animation */
.timeline-connector {
    position: absolute;
    width: 3px;
    background: linear-gradient(to bottom, var(--navy), var(--accent));
    z-index: 3;
    left: 50%;
    transform: translateX(-50%);
}

/* Individual tick positioning - keep position but ensure no animations are applied */
.tick-bba, .tick-ms, .tick-phd, .tick-consultant, .tick-ga {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Improved timeline category labels */
.timeline-labels {
    position: absolute;
    width: 100%;
    top: 50%;
    left: 0;
    z-index: 4;
    pointer-events: none;
}

.timeline-label {
    position: absolute;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: var(--font-weight-medium);
    font-size: 0.9rem;
    box-shadow: 0 3px 10px var(--shadow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    max-width: 230px; /* Increased from 180px to fit "Employment History" without wrapping */
    white-space: nowrap; /* Prevent text wrapping */
}

.employment-label {
    top: -80px; /* Adjusted position */
    left: 30px;
    transform: translateY(0);
    animation: floatLabel 2s ease-in-out infinite;
}

.education-label {
    top: 50px; /* Moved down to avoid overlap with first education tile */
    left: 30px; /* Match the left position of employment-label for alignment */
    transform: translateY(0);
    animation: floatLabel 2s ease-in-out infinite alternate;
}

@keyframes floatLabel {
     0%, 100% { transform: translateY(0); }
     50% { transform: translateY(-5px); }
}

.timeline-label i {
    color: var(--text-light);
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments with breakpoint consistency */
@media screen and (max-width: 1200px) {
    .timeline-events {
        justify-content: flex-start;
        min-width: 850px;
    }
    
    .timeline-container {
        overflow-x: auto;
        padding-bottom: 40px;
    }
    
    .education-label {
        left: 30px; /* Keep consistent with employment label */
    }
}

@media screen and (max-width: 992px) {
    .timeline-event {
        min-width: 160px;
    }
    
    .timeline-event.employment {
        margin-top: -130px;
        margin-bottom: 130px;
    }
    
    .timeline-event.education {
        margin-top: 130px;
        margin-bottom: -130px;
    }
    
    .timeline-event.employment::after {
        bottom: -34px;
        height: 34px;
    }
    
    .timeline-event.education::before {
        top: -34px;
        height: 34px;
    }
    
    .timeline-event.employment .timeline-dot {
        bottom: -65px;
    }
    
    .timeline-event.education .timeline-dot {
        top: -65px;
    }
    
    /* Position ticks properly on smaller screens */
    .timeline-event.employment .timeline-tick {
        bottom: -73px;
    }
    
    .timeline-event.education .timeline-tick {
        top: -73px;
    }
}

@media screen and (max-width: 768px) {
    .timeline-event {
        min-width: 140px;
    }
    
    .timeline-title {
        font-size: 0.95rem;
    }
    
    .timeline-event.employment {
        margin-top: -120px;
        margin-bottom: 120px;
    }
    
    .timeline-event.education {
        margin-top: 120px;
        margin-bottom: -120px;
    }
    
    .timeline-event.employment::after {
        bottom: -30px;
        height: 30px;
    }
    
    .timeline-event.education::before {
        top: -30px;
        height: 30px;
    }
    
    .timeline-event.employment .timeline-dot {
        bottom: -60px;
    }
    
    .timeline-event.education .timeline-dot {
        top: -60px;
    }
    
    .education-label {
        left: 20px; /* Match employment label at smaller screens */
        top: 70px;
    }
    
    .employment-label {
        left: 20px;
    }
    
    /* Position ticks properly on mobile */
    .timeline-event.employment .timeline-tick {
        bottom: -65px;
    }
    
    .timeline-event.education .timeline-tick {
        top: -65px;
    }
}

/* Dark theme enhancements */
.dark-theme .timeline-track {
    background: linear-gradient(to right, var(--dark-accent), var(--dark-taupe), var(--dark-accent));
}

.dark-theme .timeline-content {
    background: linear-gradient(to bottom, var(--dark-bg-secondary) 0%, rgba(30, 30, 30, 0.95) 100%);
    border-color: rgba(93, 173, 226, 0.3);
}

.dark-theme .timeline-event:hover .timeline-content {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.dark-theme .timeline-title {
    color: var(--dark-text-dark);
}

.dark-theme .timeline-dot {
    box-shadow: 0 0 0 5px var(--dark-bg-secondary), 0 0 0 8px rgba(93, 173, 226, 0.3);
}

.dark-theme .timeline-event:hover .timeline-dot {
    box-shadow: 0 0 0 5px var(--dark-bg-secondary), 0 0 0 12px rgba(93, 173, 226, 0.4);
}

.dark-theme .timeline-label {
    background: linear-gradient(135deg, var(--dark-navy-light), var(--dark-accent));
}

.dark-theme .timeline-track:before, 
.dark-theme .timeline-track:after {
    background: var(--dark-accent);
    box-shadow: 0 0 0 4px rgba(93, 173, 226, 0.3);
}

/* Horizontal timeline fixes */
.timeline-container {
    position: relative;
    padding: 120px 0 80px;
    overflow: visible;
    margin: 0;
    width: 100%;
}

/* Create a perfectly centered timeline track */
.timeline-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--navy), var(--accent), var(--navy));
    transform: translateY(-50%);
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Base positioning for events */
.timeline-event {
    position: relative;
    flex: 1;
    min-width: 150px;
    max-width: 400px;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    z-index: 3;
}

/* Base positioning for employment events */
.timeline-event.employment {
    margin-top: -220px; /* Unified distance from timeline */
    margin-bottom: 140px;
}

/* Base positioning for education events */
.timeline-event.education {
    margin-top: 140px; /* Unified distance from timeline */
    margin-bottom: -140px;
}

/* Fix for timeline ticks - general rules */
.timeline-tick {
    position: absolute;
    width: 14px;
    height: 14px;
    background-color: var(--accent);
    border: 2px solid var(--text-light);
    transform: rotate(45deg);
    z-index: 4;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Position ticks precisely on the timeline */
.timeline-event.employment .timeline-tick {
    bottom: -50px; /* Precise position to center on timeline */
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.timeline-event.education .timeline-tick {
    top: -50px; /* Precise position to center on timeline */
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

/* Fix connecting lines for employment events */
.timeline-event.employment::after {
    content: '';
    position: absolute;
    bottom: -70px;
    left: 50%;
    width: 3px;
    height: 55px; /* Adjusted height to connect perfectly */
    background: linear-gradient(to bottom, var(--navy), var(--accent));
    z-index: 3;
    transform: translateX(-50%);
}

/* Fix connecting lines for education events */
.timeline-event.education::before {
    content: '';
    position: absolute;
    top: -70px;
    left: 50%;
    width: 3px;
    height: 55px; /* Adjusted height to connect perfectly */
    background: linear-gradient(to top, var(--navy), var(--accent));
    z-index: 3;
    transform: translateX(-50%);
}

/* Remove the dots at the end of connections */
.timeline-event.employment .timeline-dot,
.timeline-event.education .timeline-dot {
    display: none;
}

/* Improved hover effects for ticks */
.timeline-event:hover .timeline-tick {
    background-color: var(--navy);
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.7);
}

/* Fix for responsive views */
@media screen and (max-width: 1200px) {
    .timeline-events {
        justify-content: space-between;
        min-width: 800px;
    }
    
    .timeline-container {
        overflow-x: auto;
        padding-bottom: 40px;
    }
}

@media screen and (max-width: 992px) {
    .timeline-event.employment .timeline-tick {
        bottom: -65px;
    }
    
    .timeline-event.education .timeline-tick {
        top: -65px;
    }
    
    .timeline-event.employment::after {
        bottom: -65px;
        height: 50px;
    }
    
    .timeline-event.education::before {
        top: -65px;
        height: 50px;
    }
    
    .timeline-event.employment {
        margin-top: -130px;
        margin-bottom: 130px;
    }
    
    .timeline-event.education {
        margin-top: 130px;
        margin-bottom: -130px;
    }
}

@media screen and (max-width: 768px) {
    .timeline-event.employment .timeline-tick {
        bottom: -60px;
    }
    
    .timeline-event.education .timeline-tick {
        top: -60px;
    }
    
    .timeline-event.employment::after {
        bottom: -60px;
        height: 45px;
    }
    
    .timeline-event.education::before {
        top: -60px;
        height: 45px;
    }
    
    .timeline-event.employment {
        margin-top: -120px;
        margin-bottom: 120px;
    }
    
    .timeline-event.education {
        margin-top: 120px;
        margin-bottom: -120px;
    }
}

/* Animation for connection lines */
@keyframes pulseConnection {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Custom Timeline Positioning */

/* Reset baseline positioning first */
.timeline-event {
    margin: 0; /* Reset margins */
    transform: none; /* Reset transforms */
    position: relative;
}

.timeline-event::before, 
.timeline-event::after {
    display: none; /* Remove the default connection lines */
}

/* Timeline track is centered vertically */
.timeline-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--navy), var(--accent), var(--navy));
    transform: translateY(-50%);
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Custom connector lines for each event */
.timeline-connector {
    position: absolute;
    width: 3px;
    background: linear-gradient(to bottom, var(--navy), var(--accent));
    z-index: 3;
    left: 50%;
    transform: translateX(-50%);
}

/* Timeline tiles positioning - Education items */
.tile-bba {
    position: absolute;
    left: 18%;
    top: 10%; /* Below timeline */
    width: 275px;
}

.tile-ms {
    position: absolute;
    left: 40%;
    top: 10%; /* Below timeline */
    width: 265px;
}

.tile-phd {
    position: absolute;
    left: 75%;
    top: 10%; /* Below timeline */
    width: 275px;
}

/* Timeline tiles positioning - Employment items */
.tile-consultant {
    position: absolute;
    left:52%;
    top: 45%; /* Above timeline - allows custom spacing from top */
    width: 250px;
}

.tile-ga {
    position: absolute;
    left: 75%;
    top: 35%; /* Above timeline */
    width: 275px;
}

/* Timeline diamonds (ticks) positioning */
.timeline-tick {
    position: absolute;
    width: 14px;
    height: 14px;
    background-color: var(--accent);
    border: 2px solid var(--text-light);
    transform: rotate(45deg);
    z-index: 4;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.tick-bba {
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    top: 200px; /* Distance from tile to diamond */
}

.tick-ms {
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    top: -40px;
}

.tick-consultant {
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    bottom: -40px;
}

.tick-phd {
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    top: -40px;
}

.tick-ga {
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    bottom: -60px;
}

/* Custom connector lines for each event */
.line-bba {
    top: -39px;
    height: 39px;
    background: linear-gradient(to top, var(--navy), var(--accent)); /* Reverse gradient for bottom items */
}

.line-ms {
    top: -39px;
    height: 39px;
    background: linear-gradient(to top, var(--navy), var(--accent));
}

.line-consultant {
    bottom: -39px;
    height: 39px;
}

.line-phd {
    top: -39px;
    height: 39px;
    background: linear-gradient(to top, var(--navy), var(--accent));
}

.line-ga {
    bottom: -39px;
    height: 39px;
}

/* Hover effects for individual ticks */
.timeline-event:hover .timeline-tick {
    background-color: var(--navy);
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.7);
}

/* Hide timeline dots as we're using custom positioning */
.timeline-dot {
    display: none;
}

/* Make the timeline container taller to accommodate manual positioning */
.timeline-container {
    height: 500px; /* Adjust this height as needed */
    position: relative;
    overflow: visible;
}

/* Remove timeline events flex layout since we're using absolute positioning */
.timeline-events {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
    /* Adjust positions for smaller screens */
    .tile-bba { left: 5%; }
    .tile-ms { left: 30%; }
    .tile-consultant { left: 18%; }
    .tile-phd { left: 55%; }
    .tile-ga { left: 70%; }
    
    .timeline-container {
        overflow-x: auto;
        min-width: 900px; /* Minimum width to show all elements */
    }
}

@media screen and (max-width: 768px) {
    /* For very small screens, keep horizontal scrolling */
    .timeline-container {
        overflow-x: auto;
        min-width: 900px;
    }
}

/* Fix education tile diamonds to prevent movement on hover */
.timeline-event.education .timeline-tick {
    position: absolute;
    width: 14px;
    height: 14px;
    background-color: var(--accent);
    border: 2px solid var(--text-light);
    transform: translateX(-50%) rotate(45deg); /* Remove translateY to maintain consistent position */
    top: -50px; /* Consistent positioning */
    left: 50%;
    z-index: 4;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Only transition these properties */
}

/* Override all hover transformations for education tiles to prevent movement */
.timeline-event.education:hover .timeline-tick {
    background-color: var(--navy);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.7);
    transform: translateX(-50%) rotate(45deg); /* Keep same transform as non-hover state */
}

/* Ensure specific education ticks (BBA, MS, PhD) maintain fixed positions */
.tick-bba, .tick-ms, .tick-phd {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    /* No transformations on hover */
}

/* Override any other hover rules that might affect education ticks */
.timeline-event:hover .timeline-tick {
    background-color: var(--navy);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.7);
    /* No transform changes on hover */
}

/* For tick-bba which has custom positioning */
.tick-bba {
    left: 50%;
    transform: translateX(-50%) rotate(45deg); /* Fixed transform */
    top: 200px; /* Fixed position */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.timeline-event:hover .tick-bba {
    transform: translateX(-50%) rotate(45deg); /* Same transform on hover */
}