/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #1a202c;
  background-color: #ffffff;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
  background: rgba(255, 255, 255, 0.98);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e40af;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-logo a:hover {
  color: #3b82f6;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: #3b82f6;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, #3b82f6, #1e40af);
  transition: width 0.3s ease;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #1e40af;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 50px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%233b82f6" stop-opacity="0.1"/><stop offset="100%" stop-color="%233b82f6" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>')
    no-repeat center center;
  background-size: cover;
  opacity: 0.5;
  z-index: 0;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1a202c;
  line-height: 1.2;
}

.highlight {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: #4b5563;
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-description {
  font-size: 1.1rem;
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: #1e40af;
  border: 2px solid #3b82f6;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #3b82f6;
  border: 2px solid #3b82f6;
}

.btn-outline:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
}

.hero-image {
  display: flex;
  justify-content: center;
  animation: fadeInRight 1s ease-out;
}

.profile-card {
  position: relative;
}

.profile-img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid #3b82f6;
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.profile-img::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  animation: rotate 4s linear infinite;
  z-index: -1;
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section Styles */
section {
  position: relative;
  z-index: 1;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: #1a202c;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #1e40af);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* About Section */
.about {
  padding: 100px 0;
  background: #ffffff;
}

.about-text p {
  font-size: 1.1rem;
  color: #4b5563;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 15px;
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: transform 0.3s ease;
}

.stat:hover {
  transform: translateY(-5px);
}

.stat h3 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat p {
  color: #4b5563;
  font-weight: 500;
}

/* Experience Section */
.experience {
  padding: 100px 0;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #3b82f6, #1e40af);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: 30px;
  position: relative;
  margin: 50px 0;
  width: 50%;
}

.timeline-item:nth-child(even) {
  align-self: flex-end;
  justify-content: flex-start;
  padding-left: 30px;
  padding-right: 0;
  margin-left: 50%;
}

.timeline-dot {
  height: 20px;
  width: 20px;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  border-radius: 50%;
  position: absolute;
  top: 20px;
  right: -40px;
  border: 4px solid white;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

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

.timeline-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: transform 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
}

.timeline-date {
  color: #3b82f6;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  color: #1a202c;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

.timeline-content ul {
  list-style: none;
  padding: 0;
}

.timeline-content li {
  color: #6b7280;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.timeline-content li::before {
  content: "▶";
  color: #3b82f6;
  position: absolute;
  left: 0;
  font-size: 0.8rem;
}

/* Certificates */

.certificates {
  padding: 120px 0px;
  margin-top: 40px;
  background: #ffffff;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}

/* Compact card */
.certificate-card {
  display: flex;
  flex-direction: column; 
  align-items: center;
  justify-content: center;
  gap: 1.2rem;             
  padding: 1.6rem 1.4rem;  
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Logo base */
.certificate-card img {
  height: auto;
  transition: transform 0.3s ease;
}

/* Logo size normalization */
.logo-wide {
  max-width: 180px;
}

.logo-tall {
  max-width: 130px;
}

.certificate-logo {
  height: 110px;     
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hover card */
.certificate-card:hover {
  background: #ffffff;
  border: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

/* Button – hidden by default */
.certificate-btn {
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.25s ease;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  color: white;
  padding: 8px 18px; 
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  pointer-events: none;  
}

/* Show button on hover */
.certificate-card:hover .certificate-btn {
  opacity: 1;
  transform: translateY(0);
}

/* Blue divider after Certificates section */
.certificates::after {
  content: "";
  display: block;
  width: 500px;  
  height: 4px;
  margin: 80px auto 0; 
  background: linear-gradient(90deg, #3b82f6, #1e40af);
  border-radius: 2px;
}

/* HCL – two buttons on hover */
.certificate-btn {
  pointer-events: auto;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  color: white;
  padding: 8px 18px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.85rem;
}


.certificate-btn-group {
  display: flex;
  gap: 1.5rem;
}




/* Show both buttons on hover */
.certificate-card:hover .certificate-btn-group {
  opacity: 1;
  transform: translateY(0);
  text-decoration: none;
  display: flex;
  gap: 1.2rem; 
}

/* Slightly smaller buttons so two fit nicely */
.certificate-btn-group .certificate-btn {
  font-size: 0.75rem;
  padding: 7px 14px;
  white-space: nowrap;
}


/* Projects Section */
.projects {
  padding: 100px 0;
  background: #ffffff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

.project-image {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(30, 64, 175, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}

.project-card:hover .project-overlay {
  opacity: 1;
  visibility: visible;
}

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

.project-links {
  display: flex;
  gap: 1.5rem;
  z-index: 20;
  position: relative;
}

.project-link {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.project-link:hover {
  transform: scale(1.15) translateY(-2px);
  background: #3b82f6;
  color: white;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.project-link i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.project-link:hover i {
  transform: scale(1.1);
}

/* Ensure project links are always accessible */
.project-overlay * {
  pointer-events: auto;
}

.project-link {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Add hover effect for better visibility */
.project-card:hover .project-links {
  animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Add pulse animation to draw attention */
.project-link {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
  }
  100% {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
}

.project-card:hover .project-link {
  animation: none;
}

.project-content {
  padding: 2rem;
}

.project-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1a202c;
}

.project-content p {
  color: #4b5563;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech span {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1e40af;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Skills Section */
.skills {
  padding: 100px 0;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
}

.skill-category h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #1a202c;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h3 i {
  color: #3b82f6;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-item {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: default;
}

.skill-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Contact Section */
.contact {
  padding: 100px 0;
  background: #ffffff;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1a202c;
}

.contact-info p {
  color: #4b5563;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-details {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: #4b5563;
  transition: color 0.3s ease;
}

.contact-item:hover {
  color: #3b82f6;
}

.contact-item i {
  width: 20px;
  color: #3b82f6;
  font-size: 1.1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.contact-form {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  color: white;
  text-align: center;
  padding: 2rem 0;
}

/* CV Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.close {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.close:hover {
  opacity: 0.7;
}

.modal-body {
  padding: 2rem;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
}

.cv-content {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #1a202c;
}

.cv-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #3b82f6;
}

.cv-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 0.5rem;
}

.cv-contact p {
  color: #4b5563;
  margin: 0.25rem 0;
}

.cv-section {
  margin-bottom: 2rem;
}

.cv-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.cv-item {
  margin-bottom: 1.5rem;
}

.cv-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cv-item-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a202c;
  margin: 0;
}

.cv-item-header span {
  color: #3b82f6;
  font-weight: 500;
  font-size: 0.9rem;
}

.cv-item ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.cv-item li {
  color: #4b5563;
  margin-bottom: 0.25rem;
  padding-left: 1rem;
  position: relative;
}

.cv-item li::before {
  content: "•";
  color: #3b82f6;
  position: absolute;
  left: 0;
}

.cv-skills {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cv-skill-category {
  color: #4b5563;
  line-height: 1.6;
}

.cv-skill-category strong {
  color: #1a202c;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 0;
    margin-left: 0;
  }

  .timeline-item:nth-child(even) {
    margin-left: 0;
    padding-left: 50px;
    padding-right: 0;
    justify-content: flex-start;
  }

  .timeline-dot {
    left: 10px;
    right: auto;
  }

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

  .cv-item-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .modal-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .container {
    padding: 0 15px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .profile-img {
    width: 250px;
    height: 250px;
  }
}

/* Print styles for CV */
@media print {
  .modal-header,
  .modal-actions {
    display: none !important;
  }

  .modal-body {
    padding: 0;
    max-height: none;
    overflow: visible;
  }

  .cv-content {
    font-size: 12px;
    line-height: 1.4;
  }

  .cv-header h1 {
    font-size: 24px;
  }

  .cv-section h2 {
    font-size: 16px;
  }
}

/* Loading animation */
body:not(.loaded) {
  overflow: hidden;
}

body:not(.loaded)::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

body:not(.loaded)::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 5px solid #e5e7eb;
  border-top: 5px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
}

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

.nav-link.active {
  color: #3b82f6 !important;
}

.cv-viewer {
  width: 100%;
  height: 600px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

#cv-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

.cv-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.fallback-message {
  padding: 2rem;
}

.fallback-message h3 {
  color: #1a202c;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.fallback-message p {
  color: #4b5563;
  margin-bottom: 2rem;
}

.profile-img img,
.project-image img {
  transition: opacity 0.3s ease;
}

.profile-img img[src*="files/"],
.project-image img[src*="files/"] {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

/* Image loading placeholder */
.profile-img::before,
.project-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 2rem;
  z-index: 1;
}

.profile-img::before {
  content: "\f007"; /* user icon */
  border-radius: 50%;
}

.project-image::before {
  content: "\f1c5"; /* image icon */
}

.profile-img img:not([src=""]),
.project-image img:not([src=""]) {
  position: relative;
  z-index: 2;
}

/* CV Loading Styles */
.cv-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 600px;
  background: #f8fafc;
  border-radius: 10px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.cv-loading p {
  color: #4b5563;
  font-weight: 500;
}

/* Fallback Styles */
.cv-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 600px;
  background: #f8fafc;
  border-radius: 10px;
  text-align: center;
}

.fallback-message {
  padding: 2rem;
  max-width: 400px;
}

.fallback-message h3 {
  color: #1a202c;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.fallback-message p {
  color: #4b5563;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.fallback-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Embed Fallback */
.cv-embed-fallback {
  width: 100%;
  height: 600px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

#cv-embed {
  width: 100%;
  height: 100%;
  border: none;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .fallback-buttons {
    flex-direction: column;
  }

  .fallback-buttons .btn {
    width: 100%;
  }
}

/* Dino Game – Fully Blended */
.dino-wrapper {
  margin-top: 100px;
  position: relative;
  padding: 0;
  width: 100%;
  max-width: 600px;
  background: transparent;
  border: none;
  box-shadow: none;
}
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.3fr; 
  gap: 4rem;
  align-items: start;
}

.dino-ground {
  width: 100%;
}

#dinoCanvas {
  width: 100%;
  height: 260px;
  display: block;
}

/* Start / Restart Button – fully transparent */
.dino-btn {
  position: absolute;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);

  background: transparent !important;
  border: none;
  outline: none;

  padding: 0;
  margin: 0;

  color: rgb(4, 4, 4);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;

  box-shadow: none;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  user-select: none;
}

.dino-btn:focus,
.dino-btn:active {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.dino-btn:hover {
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.4));
}


#dinoCanvas {
  /* fade on left & right edges */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );

  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
}
