:root {
  --primary: #8a4fff;
  --primary-dark: #6b2fcc;
  --primary-light: #b18aff;
  --secondary: #ff6b8b;
  --accent: #4ecdc4;
  --light: #faf7ff;
  --dark: #2d2b3a;
  --dark-bg: #3a3751;
  --gray: #8c8a9e;
  --gray-light: #e5e1f6;
  --gray-dark: #56546a;
  --card-bg: #ffffff;
  --section-bg: #f5f2ff;
  --success: #4ecdc4;

  --font-main: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --shadow: 0 8px 20px rgba(138, 79, 255, 0.15);
  --shadow-lg: 0 15px 30px rgba(138, 79, 255, 0.2);
  --transition: all 0.3s ease;
  --border-radius: 12px;

  /* Text colors */
  --text-primary: var(--dark);
  --text-secondary: var(--gray-dark);

  /* Background colors */
  --bg-primary: var(--light);
  --bg-secondary: white;

  /* Additional variables for dark mode toggle */
  --theme-toggle-bg: var(--gray-light);
  --theme-toggle-icon: "\f186"; /* moon icon for light mode */
}

/* Dark mode variables */
[data-theme="dark"] {
  --primary: #9e6cff;
  --primary-dark: #8a4fff;
  --primary-light: #b18aff;
  --light: #2d2b3a;
  --dark: #faf7ff;
  --dark-bg: #23222e;
  --gray: #6d6b80;
  --gray-light: #3a3751;
  --gray-dark: #8c8a9e;
  --card-bg: #3a3751;
  --section-bg: #2d2b3a;
  --text-primary: #faf7ff;
  --text-secondary: #8c8a9e;
  --bg-primary: #23222e;
  --bg-secondary: #3a3751;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.4);
  --theme-toggle-bg: var(--primary);
  --theme-toggle-icon: "\f185"; /* sun icon for dark mode */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 80px 0;
  background-color: var(--section-bg);
  transition: background-color 0.3s ease;
}

h1,
h2,
h3,
h4 {
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mt-3 {
  margin-top: 1rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  color: var(--text-primary);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--primary);
  color: white;
  border-radius: var(--border-radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(var(--bg-primary-rgb), 0.95);
  box-shadow: 0 2px 10px rgba(138, 79, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--theme-toggle-bg);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 20px;
  order: 1; /* Ensure it's at the end */
}

.theme-toggle::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: var(--theme-toggle-icon);
  color: var(--text-primary);
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* ===== HERO SECTION ===== */
#hero {
  padding-top: 150px;
  background: linear-gradient(
    135deg,
    var(--section-bg) 0%,
    var(--gray-light) 100%
  );
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(138, 79, 255, 0.1);
  z-index: 0;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 107, 139, 0.1);
  z-index: 0;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  gap: 60px;
}

.hero-text {
  flex: 1;
  padding-right: 30px;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.hero-title span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-top: 2rem;
}

.hero-image {
  flex: 1;
  text-align: center;
  position: relative;
  margin-left: 60px;
}

.hero-image img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--card-bg);
  box-shadow: var(--shadow-lg);
  transition: border-color 0.3s ease;
}

.floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* ===== ABOUT SECTION ===== */
#about {
  background-color: var(--bg-secondary);
}

.about-container {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border-left: 4px solid var(--secondary);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 2;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.about-text b {
  color: var(--primary);
  font-weight: 600;
}

/* ===== EDUCATION SECTION ===== */
#education {
  background: linear-gradient(
    135deg,
    var(--section-bg) 0%,
    var(--gray-light) 100%
  );
}

.education-container {
  display: flex;
  align-items: center;
  gap: 50px;
}

.education-text {
  flex: 1;
}

.education-item {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border-left: 4px solid var(--primary);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 20px; /* gives breathing room between degree and date */
}

/* wider fixed area for the date, stays inside the container */
.education-date {
  flex: 0 0 120px; 
  min-width: 100px; 
  text-align: right;
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 700;
}

/* Responsive: stack header and make date full-width/centered on smaller screens */
@media (max-width: 992px) {
  .education-header {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
  }

  .education-date {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    text-align: center;
    padding-left: 14px;
    padding-right: 14px;
  }
}

.education-degree {
  font-size: 1.5rem;
  color: var(--primary);
}

.education-date {
  background: var(--primary);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.education-institution {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.education-image {
  flex: 1;
  text-align: center;
}

.education-image img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--card-bg);
  box-shadow: var(--shadow-lg);
  transition: border-color 0.3s ease;
}

/* ===== SKILLS SECTION ===== */
#skills {
  background-color: var(--bg-secondary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.skill-item {
  background: var(--card-bg);
  padding: 30px 20px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-top: 4px solid var(--primary);
}

.skill-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.skill-item i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.skill-item h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.skill-item p {
  color: var(--text-secondary);
}

/* ===== PROJECTS SECTION ===== */
#projects {
  background: linear-gradient(
    135deg,
    var(--section-bg) 0%,
    var(--gray-light) 100%
  );
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 25px;
}

.project-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tech-tag {
  background: var(--gray-light);
  color: var(--text-primary);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.project-links {
    margin-top: auto;       /* pushes links to the bottom of the column */
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ===== CONTACT SECTION ===== */
#contact {
  background-color: var(--bg-secondary);
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
}

.contact-info {
  padding: 30px;
  background: linear-gradient(
    135deg,
    var(--section-bg) 0%,
    var(--gray-light) 100%
  );
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.contact-image-container {
  text-align: center;
  margin-bottom: 30px;
}

.contact-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--card-bg);
  box-shadow: var(--shadow);
  margin: 0 auto;
  transition: border-color 0.3s ease;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 1.2rem;
}

.contact-text h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.contact-text a,
.contact-text p {
  color: var(--text-secondary);
}

.contact-social {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary-dark);
  transform: translateY(-5px);
}

.contact-form {
  padding: 30px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: background-color 0.3s ease;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(138, 79, 255, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ===== FOOTER ===== */
footer {
  background: var(--dark-bg);
  color: white;
  padding: 30px 0;
  text-align: center;
  transition: background-color 0.3s ease;
}

.copyright {
  margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
  h1 {
    font-size: 2.8rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .hero-content,
  .about-content,
  .education-container {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    padding-right: 0;
    margin-bottom: 50px;
    order: 2; /* Text comes after image on mobile */
  }

  .hero-image {
    order: 1; /* Image comes before text on mobile */
    margin-left: 0;
    margin-bottom: 30px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .education-header {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--card-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transition: var(--transition);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin-left: 0;
  }

  .hamburger {
    display: block;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

  .hero-image img {
    width: 280px;
    height: 280px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  /* Theme toggle is now part of the navigation menu */
  .theme-toggle {
    position: static;
    margin: 20px 0;
  }
}

@media (max-width: 576px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-image img {
    width: 220px;
    height: 220px;
  }

  section {
    padding: 60px 0;
  }

  .about-container {
    padding: 25px;
  }
}



/*here update*/
/* Project Detail Styles */
.project-detail-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 30px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.project-detail-header {
    margin-bottom: 30px;
    text-align: center;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.project-date, .project-category {
    background: var(--primary-light);
    color: var(--dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.project-detail-image {
    margin-bottom: 40px;
    text-align: center;
}

.project-detail-image img {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.project-detail-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary);
}

.project-detail-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.project-detail-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.project-links {
    margin-top: 40px;
    text-align: center;
}

/* Responsive adjustments for project detail */
@media (max-width: 768px) {
    .project-detail-container {
        padding: 25px;
    }
    
    .project-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}
