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

:root {
  --primary: #9c27b0;
  --secondary: #e91e63;
  --accent: #06b6d4;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding-top: 80px;
}

body.dark {
  --dark: #f8fafc;
  --light: #0f172a;
  --gray: #94a3b8;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

body.dark nav {
  background: rgba(15, 23, 42, 0.9);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Add these styles to your existing CSS without modifying what you have */

/* Mobile Toggle Button - only shows on mobile */
.mobile-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
  float: right;
}

.mobile-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: var(--primary);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Transform bars when active */
.mobile-toggle.active .bar:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

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

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(10px);
  transition: right 0.3s ease;
  z-index: 1000;
  padding-top: 80px;
}

body.dark .mobile-menu {
  background: rgba(15, 23, 42, 0.95);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
}

.mobile-menu a {
  display: block;
  color: var(--dark);
  text-decoration: none;
  padding: 1rem 2rem;
  transition: background-color 0.3s ease;
  font-weight: 500;
}

.mobile-menu a:hover {
  background-color: rgba(156, 39, 176, 0.1);
  color: var(--primary);
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Only show mobile toggle on mobile screens, preserve existing behavior */
@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  /* Hide desktop nav links on mobile (this should already exist in your CSS) */
  .nav-links {
    display: none;
  }
  .hero {
    margin-top: 70px;
  }
  .contact-container {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    gap: 2rem;
    padding: 0 1rem;
  }

  .contact-info {
    flex-direction: column; /* Stack vertically on mobile */
    align-items: stretch;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .contact-item {
    min-width: auto;
    margin-bottom: 0;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .contact-info {
    gap: 1rem;
    padding: 1rem;
  }
}

/* Desktop layout - side by side */
@media (min-width: 769px) {
  .contact-container {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}
/* Projects Section */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

body.dark .project-card {
  background: var(--dark);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

body.dark .project-card:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(99, 102, 241, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.project-content {
  padding: 2rem;
}

.project-title {
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.project-description {
  color: var(--gray);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

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

.tech-tag {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.theme-toggle {
  background: none;
  border: 2px solid var(--gray);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--dark);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Hero Section */
.hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--light) 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

body.dark .hero {
  background: linear-gradient(135deg, var(--light) 0%, #1e293b 100%);
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typing-text {
  font-size: 1.5rem;
  color: var(--gray);
  margin-bottom: 2rem;
  min-height: 2em;
}

.cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  color: white;
  transform: translateY(0);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

/* Section Styles */
section {
  padding: 5rem 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-category {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

body.dark .skill-category {
  background: var(--light);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.skill-category h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-left: 1rem;
}

body.dark .skill-bar {
  background: #374151;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  border-radius: 4px;
  width: 0;
  transition: width 2s ease;
}

/* Experience Section */
.timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

.timeline::before {
  display: none; /* remove the vertical line */
}

.timeline-item {
  width: 100%;
  left: 0 !important;
  padding: 0 !important;
}

.timeline-date {
  display: none; /* remove the dot markers */
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 3rem;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 3rem;
}

.timeline-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: transform 0.3s ease;
}

body.dark .timeline-content {
  background: var(--light);
}

body.dark .job-description {
  color: var(--dark);
}

.timeline-content:hover {
  transform: scale(1.05);
}

.timeline-date {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-date {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-date {
  left: -10px;
}
.play-btn {
  font-size: 3.5rem;
  color: white;
  background: rgba(156, 39, 176, 0.8);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform 0.2s ease, background 0.2s ease;
}

.media-trigger:hover .play-btn {
  transform: scale(1.15);
  background: rgba(233, 30, 99, 0.9);
}
.job-title {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.company {
  color: var(--gray);
  margin-bottom: 1rem;
}

.job-description {
  color: var(--dark);
}

.job-description ul {
  padding-left: 1rem;
}

.job-description li {
  margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 3rem;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.contact-info {
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-around;
  align-items: center;
}

body.dark .contact-info {
  background: var(--dark);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  flex: 1;
  min-width: 200px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 1rem;
  font-size: 1.2rem;
  flex-shrink: 0; 
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body.dark .contact-form {
  background: var(--dark);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: var(--light);
  color: var(--dark);
}

body.dark .form-group input,
body.dark .form-group textarea {
  border-color: #374151;
  background: #1e293b;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--light);
  text-align: center;
  padding: 2rem 0;
}

body.dark footer {
  background: #0f172a;
}

/* Responsive Design */
@media (max-width: 768px) {
  .timeline {
  grid-template-columns: 1fr;
}
  .nav-links {
    display: none;
  }

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

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 3rem !important;
    padding-right: 0 !important;
  }

  .timeline-date {
    left: 10px !important;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: block;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
}

.modal-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 1001;
}

.close:hover {
  color: #ccc;
}

/* Media overlay on project thumbnails */
.project-image {
  position: relative;
  overflow: hidden;
  height: 250px;
  cursor: pointer;
}

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

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

.media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.play-btn {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  transition: transform 0.2s ease;
}

.media-trigger:hover .play-btn {
  transform: scale(1.15);
}

/* Modal video support */
.modal-video {
  width: 90vw;
  max-width: 900px;
  height: 56.25vw;  /* 16:9 ratio */
  max-height: 506px;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.6);
  background: #000;
  display: block;
}

/* Improved modal close button */
#mediaModal .close {
  position: fixed;
  top: 18px;
  right: 28px;
  color: #fff;
  font-size: 2.8rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 1002;
}

#mediaModal .close:hover {
  background: var(--secondary);
  transform: scale(1.1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.btn-accent {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Resume button styling */
.btn-accent {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}