/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  padding: 0.8rem 0;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #667eea;
  transition: transform 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 25px;
}

.nav-links a:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #667eea;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 80%;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.lang-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.lang-flag {
  font-size: 1.2rem;
}

.lang-text {
  font-size: 0.9rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;               /* Use min-height to avoid clipping when content grows */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  padding-top: 4rem;               /* room for fixed nav - tweak to match nav height */
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid white;
  color: white;
}

.cta-btn.primary {
  background: white;
  color: #667eea;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Section styling */
section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

section.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #333;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.section-title.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 2px;
  transition: width 0.8s ease 0.3s;
}

.section-title.animate-in::after {
  width: 80px;
}

/* Timeline Section */
.timeline-section {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
}

.timeline-wrapper {
  display: block;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  position: relative;
  padding-left: 200px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #3498db;
  z-index: 1;
}

.timeline-item {
  position: relative;
  padding: 2rem;
  border-radius: 15px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  margin-left: 0;
}

.timeline-item:hover {
  transform: translateY(-5px);
  background: #ffffff;
  border-color: #3498db;
  box-shadow: 0 10px 30px rgba(52, 152, 219, 0.15);
}

.timeline-item.active {
  background: #ffffff;
  border-color: #3498db;
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(52, 152, 219, 0.2);
}

.timeline-dot {
  position: absolute;
  left: -50px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: #3498db;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 0 0 3px #3498db;
  z-index: 2;
}

.timeline-date {
  position: absolute;
  left: -100px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  color: #3498db;
  font-weight: 700;
  width: 80px;
  text-align: center;
  background: white;
  padding: 0.5rem 0;
  z-index: 3;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(52, 152, 219, 0.1);
}

.timeline-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.timeline-description {
  color: #5a6c7d;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Gallery Items */
.gallery-item {
  flex: 0 0 250px;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: 10px;
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.1);
  filter: brightness(1.1);
}

/* Projects Section */
.projects-section {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.4s ease;
  border: 1px solid #e9ecef;
  opacity: 0;
  transform: translateY(30px);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.6s ease;
}

.project-card:hover::before {
  left: 100%;
}

.project-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.project-type {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
}

.project-card:hover .project-type {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.project-title {
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem 0;
  color: #333;
  transition: color 0.3s ease;
}

.project-card:hover .project-title {
  color: #667eea;
}

.project-tech {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.project-card:hover .project-tech {
  color: #555;
}

.project-content {
  display: block;
  margin-top: 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.project-content.expanded {
  max-height: 2000px;
  display: block;
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    max-height: 2000px;
    transform: translateY(0);
  }
}

.project-section {
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.5s ease forwards;
}

.project-section:nth-child(2) {
  animation-delay: 0.1s;
}

.project-section:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.project-section h4 {
  color: #667eea;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  position: relative;
}

.project-section h4::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #667eea;
  transition: width 0.3s ease;
}

.project-content.expanded .project-section h4::after {
  width: 30px;
}

.project-section ul {
  margin-left: 1rem;
}

.project-section li {
  margin-bottom: 0.3rem;
  color: #555;
  transition: color 0.3s ease;
}

.project-section li:hover {
  color: #333;
}

.expand-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.expand-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.expand-btn:hover::before {
  width: 300px;
  height: 300px;
}

.expand-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Skills Section */
.skills-section {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.skill-item {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.skill-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.6s ease;
}

.skill-item:hover::before {
  transform: scale(1);
}

.skill-item.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.skill-item:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2, #667eea);
}

.skill-item:nth-child(odd):hover {
  transform: translateY(-5px) scale(1.05) rotate(2deg);
}

.skill-item:nth-child(even):hover {
  transform: translateY(-5px) scale(1.05) rotate(-2deg);
}

/* Contact Section */
.contact-section {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  text-align: center;
}

.contact-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #666;
}

.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Footer */
footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

/* Results Gallery Section */
.results-gallery-section {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  padding: 4rem 2rem;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.result-category {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.4s ease;
  border: 1px solid #e9ecef;
  opacity: 1;
  position: relative;
  overflow: hidden;
}

.result-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.6s ease;
}

.result-category:hover::before {
  left: 100%;
}

.result-category.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.result-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.result-header {
  margin-bottom: 2rem;
}

.result-type {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
}

.result-category:hover .result-type {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.result-title {
  font-size: 1.4rem;
  margin: 1rem 0 0.5rem 0;
  color: #333;
  transition: color 0.3s ease;
}

.result-category:hover .result-title {
  color: #667eea;
}

.result-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.result-category:hover .result-description {
  color: #555;
}

.result-gallery {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #667eea #f1f1f1;
}

.result-gallery::-webkit-scrollbar {
  height: 8px;
}

.result-gallery::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.result-gallery::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 4px;
}

/* Training Section */
.training-section {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
}

.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.training-item {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.4s ease;
  border: 1px solid #e9ecef;
  opacity: 1;
  transform: translateY(0);
  position: relative;
  overflow: hidden;
}

.training-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.6s ease;
}

.training-item:hover::before {
  left: 100%;
}

.training-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.training-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.training-header {
  margin-bottom: 1rem;
}

.training-title {
  font-size: 1.3rem;
  margin: 0 0 0.5rem 0;
  color: #333;
  transition: color 0.3s ease;
}

.training-item:hover .training-title {
  color: #667eea;
}

.training-provider {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 0.2rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-right: 0.5rem;
  transition: all 0.3s ease;
}

.training-item:hover .training-provider {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.training-year {
  background: #e9ecef;
  color: #667eea;
  padding: 0.2rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
}

.training-item:hover .training-year {
  background: #667eea;
  color: white;
  transform: scale(1.05);
}

.training-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.training-item:hover .training-description {
  color: #555;
}

/* Gallery Modal */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.gallery-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gallery-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1010;
}

#galleryModalImage,
#galleryModalVideo {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 5px;
  object-fit: contain;
}

.gallery-modal-nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
}

.gallery-nav-btn {
  background-color: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  padding: 5px 15px;
  border-radius: 5px;
}

.gallery-nav-btn:hover {
  background-color: rgba(255,255,255,0.3);
}

/* Hero Profile + CV Card */
.hero-profile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0 1.5rem 0;
  animation: fadeInHero 1.2s ease forwards;
  opacity: 0;
}

@keyframes fadeInHero {
  from { 
    opacity: 0; 
    transform: translateY(20px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.hero-photo-container {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255,255,255,0.35);
  overflow: hidden;
  position: relative;
  animation: floatPhoto 6s ease-in-out infinite;
}

.hero-photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

@keyframes floatPhoto {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-18px); }
  100% { transform: translateY(0px); }
}

.hero-cv-card {
 width: 90%;
  max-width: 260px;
  padding: 0.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: floatCV 7s ease-in-out infinite;
}

@keyframes floatCV {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

.cv-icon {
  font-size: 2rem;
  background: rgba(255,255,255,0.25);
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  flex-shrink: 0;
}

.cv-text {
  display: flex;
  flex-direction: column;
  color: white;
  flex-grow: 1;
  margin: 0 1rem;
  text-align: center;
}

.cv-title {
  font-size: 1rem;
  font-weight: 700;
}

.cv-sub {
  opacity: 0.85;
  font-size: 0.85rem;
}

.cv-download-btn {
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.cv-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102,126,234,0.45);
}

/* ===========================
   RESPONSIVE NAVBAR STYLES
   =========================== */

/* Hamburger Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.nav-toggle span {
  width: 100%;
  height: 3px;
  background: #667eea;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===========================
   ENHANCED MOBILE EXPERIENCE
   =========================== */

/* Improved touch targets for mobile */
@media (max-width: 480px) {
  .nav-links a {
    padding: 1rem;
    font-size: 1.1rem;
    display: block;
    margin: 0.5rem 0;
    
  }
  @media (max-width: 480px) {
  .hero-cv-card {
    flex-direction: column;
    text-align: center;
    gap: 0.6rem;
  }
}

  .cta-btn, .contact-btn, .expand-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .lang-toggle {
    min-width: 60px;
    min-height: 44px;
  }
  
  /* Smooth transitions for all interactive elements */
  .nav-links a,
  .cta-btn,
  .contact-btn,
  .expand-btn,
  .lang-toggle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Prevent zoom on input for iOS */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .timeline {
    padding-left: 60px;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-dot {
    left: -20px;
    width: 12px;
    height: 12px;
  }
  
  .timeline-date {
    left: -60px;
    font-size: 1.4rem;
    width: 60px;
  }
  
  .timeline-item {
    padding: 1.5rem;
  }
  
  .gallery-item {
    flex: 0 0 200px;
    height: 150px;
  }
  
  /* Mobile Navigation */
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    transition: left 0.3s ease;
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-content {
    justify-content: space-between;
  }
  
  .lang-toggle {
    z-index: 1001;
  }
  
  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
  }
  
  /* Mobile Hero Profile */
  .hero-profile-wrapper {
    position: relative;
    right: 0;
    top: 0;
    transform: none;
    margin-top: 3rem;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  
  .hero-photo-container {
    width: 260px;
    height: 260px;
  }
  
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .training-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .training-item {
    padding: 1.5rem;
  }
  
  .training-provider,
  .training-year {
    display: block;
    margin: 0.2rem 0;
    width: fit-content;
  }
  
  .nav-content {
    flex-direction: row;
    gap: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  section {
    padding: 3rem 1rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .timeline {
    padding-left: 40px;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-dot {
    left: -10px;
    width: 10px;
    height: 10px;
  }
  
  .timeline-date {
    left: -40px;
    font-size: 1.2rem;
    width: 10px;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-profile-wrapper {
    margin-top: 20rem;
    gap: 1.5rem;
  }
  
  .hero-photo-container {
    width: 160px;
    height: 160px;
  }
  
}
@media (max-width: 768px) {
  .hero {
    padding-top: 2rem !important;
  }

  .hero-profile-wrapper {
    margin-top: 6rem !important;
  }
}


@media (max-width: 768px) {
  .hero-profile-wrapper {
   .hero-profile-wrapper {
    margin-top: 2rem;
  }
}
/* Mobile CV Card Fix */
@media (max-width: 768px) {
  .hero-cv-card {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
    padding: 1rem;
  }
    .hero-photo-container {
    width: 200px;
    height: 200px;
  }}

@media (max-width: 768px) {
  .timeline-date {
    left: -82px;      /* bring date closer */
    font-size: 1.2rem;
    width: 50px;
  }

  .timeline-dot {
    left: -15px;      /* keep dot aligned with line */
     width: 10px;
    height: 10px;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #3498db;
  }
}}