/* ======================= General Reset ======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

h1, h2, h3 {
  margin-bottom: 15px;
  font-weight: 600;
}

/* ======================= Navbar ======================= */
.navbar {
  position: fixed;
  width: 100%;
  background: #0d1b2a;
  padding: 10px 20px;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu li a:hover {
  color: #ffb703;
}

/* ======================= Mobile Menu ======================= */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle .bar {
  height: 3px;
  width: 25px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hamburger animation when open */
.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Show menu toggle on mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: #0d1b2a;
    flex-direction: column;
    width: 200px;
    display: none;
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    transition: all 0.3s ease;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    margin: 10px 0;
    text-align: center;
  }
}

/* ======================= Smooth Scroll ======================= */
html {
  scroll-behavior: smooth;
}

/* ======================= Sections ======================= */
.section {
  padding: 100px 10%;
}

.section h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  color: #0d1b2a;
  position: relative;
}

.section h2::after {
  content: "";
  width: 60px;
  height: 4px;
  background: #ffb703;
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ======================= Home ======================= */
.home {
  height: 100vh;
  background-size: cover;
  background-position: center;
  position: relative;
}

.home .overlay {
  background: rgba(0, 0, 0, 0.6);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
}

.home h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.home p {
  font-size: 1.2rem;
}

/* ======================= About ======================= */
.about-container {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.about-img {
  width: 300px;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.about-text {
  flex: 1;
}

.btn {
  display: inline-block;
  margin-top: 15px;
  background: #ffb703;
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  transition: background 0.3s;
}

.btn:hover {
  background: #fb8500;
}

/* ======================= Education ======================= */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.edu-card {
  background: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  text-align: center;
}

.edu-card img {
  width: 50px;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* ======================= Experience ======================= */
.exp-item {
  display: flex;
  align-items: flex-start; /* Aligns top of image and text */
  margin-bottom: 50px;     /* Extra space between experience items */
  gap: 30px;               /* More spacing between image and text */
  flex-wrap: wrap;
}

.exp-item img {
  width: 180px;             /* Slightly smaller image */
  height: auto;             /* Maintain aspect ratio */
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.exp-info {
  flex: 1;
  text-align: justify;       /* Justify text */
  margin-top: 5px;           /* Small spacing from image top if needed */
}

.exp-item.odd {
  flex-direction: row;
}

.exp-item.even {
  flex-direction: row-reverse;
}

.exp-bullets {
  padding-left: 25px;        /* Indent bullet points slightly more */
  margin-top: 15px;          /* Space from preceding content */
}

.exp-bullets li {
  margin-bottom: 12px;       /* More space between bullet points */
  line-height: 1.7;          /* Better readability */
}


/* ======================= Projects ======================= */
.proj-item {
  display: flex;
  align-items: flex-start; /* Align top of image and text */
  gap: 30px;               /* More spacing between image and text */
  margin-bottom: 50px;     /* More space between project items */
  flex-wrap: wrap;
}

.proj-item img {
  width: 250px;             /* Slightly smaller image */
  height: auto;             /* Maintain aspect ratio */
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.proj-info {
  flex: 1;
  text-align: justify;       /* Justify project description */
  margin-top: 5px;           /* Small spacing from image top if needed */
}

.proj-bullets {
  padding-left: 25px;        /* Indent bullet points slightly more */
  margin-top: 15px;          /* Space from preceding content */
}

.proj-bullets li {
  margin-bottom: 12px;       /* More space between bullet points */
  line-height: 1.7;          /* Better readability */
}


/* ======================= Skills & Charts ======================= */
.chart-div {
  width: 100%;
  height: 400px;
  min-height: 320px;
}

.skills-container {
  margin-top: 24px;
}

/* ======================= Testimonials ======================= */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.testimonial-card {
  background: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  font-style: italic;
  position: relative;
}

.testimonial-card span {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  text-align: right;
}

/* ======================= Contact ======================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  text-align: center;
}

.contact-grid p a {
  color: #0d1b2a;
  text-decoration: none;
  font-weight: 500;
}

.contact-grid p a:hover {
  color: #fb8500;
}

/* ======================= Footer ======================= */
footer {
  background: #0d1b2a;
  padding: 15px 23px;
  color: #fff;
  text-align: center;
}

footer span a {
  color: lightblue;
  text-decoration: none;
}

footer span a:hover {
  text-decoration: underline;
}

/* ======================= Responsive Adjustments ======================= */
@media (max-width: 768px) {
  .about-container,
  .exp-item,
  .proj-item {
    flex-direction: column;
    text-align: center;
  }

  .exp-item img,
  .proj-item img,
  .about-img {
    width: 100%;
  }

  .plotly-3d, .plotly-2d {
    height: 360px !important;
  }
}


