/* ===================================================================
   1. Global & Theme Variables
=================================================================== */
:root {
  /* Fonts */
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --heading-font: "Raleway", sans-serif;
  --nav-font: "Poppins", sans-serif;

  /* Base Theme Colors */
  --background-color: #f9f6f0;
  --surface-color: #ffffff;
  --heading-color: #896c6c;
  --default-color: #d6a99d;
  --accent-color: #d6a99d;
  --contrast-color: #ffffff;

  /* Navigation Specific Colors */
  --nav-color: rgba(255, 255, 255, 0.55);
  --nav-hover-color: #ffffff;
}

/* Smooth Scroll Behavior */
:root {
  scroll-behavior: smooth;
}

/* ===================================================================
   2. General Styling & Shared Classes
=================================================================== */
body::-webkit-scrollbar {
  width: 12px;
  background: #F2EBDF;
}
body::-webkit-scrollbar-thumb {
  background: #d6a99d;
  border-radius: 8px;
  border: 2px solid #F2EBDF;
}
body::-webkit-scrollbar-thumb:hover {
  background: #896c6c;
}

/* Navbar scrollbar */
.header::-webkit-scrollbar {
  width: 8px;
  background: #2e2e38;
}
.header::-webkit-scrollbar-thumb {
  background: #d6a99d;
  border-radius: 8px;
  border: 2px solid #2e2e38;
}
.header::-webkit-scrollbar-thumb:hover {
  background: #896c6c;
}
body {
  color: var(--default-color);
  background-color: #F2EBDF;
  /* background-color: var(--ba); */

  font-family: var(--default-font);
}

a {
  color: var(--default-color);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: #b97c6a;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

p {
  color: #171717;
  margin-bottom: 20px;
  font-size: 20px;
  line-height: 35px;
  font-weight: 500;
}

/* ===================================================================
   3. Preloader
=================================================================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  overflow: hidden;
  background: var(--background-color);
  transition: all 0.6s ease-out;
}

#preloader:before {
  content: "";
  position: fixed;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 6px solid var(--accent-color);
  border-color: var(--accent-color) transparent var(--accent-color) transparent;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: animate-preloader 1.5s linear infinite;
}

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

/* ===================================================================
   4. Scroll Top Button
=================================================================== */
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: -15px;
  z-index: 99999;
  background-color: var(--accent-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: var(--contrast-color);
  line-height: 0;
}

.scroll-top:hover {
  background-color: rgba(110, 59, 110, 0.8);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  bottom: 15px;
}

/* ===================================================================
   5. Header & Navigation
=================================================================== */
.header {
  color: var(--default-color);
  background-color: var(--background-color);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  padding: 0 15px;
  width: 300px;
  transition: all ease-in-out 0.3s;
  overflow-y: auto;
  z-index: 997;
  border-right: 1px solid rgba(137, 108, 108, 0.1);
  background: #2e2e38;
}

.profile-img-main {
  width: 160px !important;
  height: 160px !important;
  object-fit: cover !important;
  border: 4px solid var(--accent-color) !important;
}

.header .logo h1.sitename {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
  width: 75%;
}

.header .social-links {
  margin: 0 0 20px 0;
}

.header .social-links a {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--contrast-color);
  margin: 0 2px;
  border-radius: 50%;
  text-align: center;
  width: 40px;
  height: 40px;
  transition: 0.3s;
}

.header .social-links a:hover {
  background: var(--default-color);
}

.header.header-show {
  left: 0;
}

.header .header-toggle {
  color: var(--contrast-color);
  background-color: var(--accent-color);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 9999;
  transition: background-color 0.3s;
}

.navmenu {
  padding: 0;
  z-index: 9997;
}

.navmenu ul {
  list-style: none;
  padding: 0 0 20px 0;
  margin: 0;
}

.navmenu a,
.navmenu a:focus {
  color: var(--nav-color);
  padding: 15px 10px;
  font-family: var(--nav-font);
  font-size: 16px;
  font-weight: 400;
  display: flex;
  align-items: center;
  white-space: nowrap;
  transition: 0.3s;
  width: 100%;
}

.navmenu a .navicon,
.navmenu a:focus .navicon {
  font-size: 20px;
  margin-right: 10px;
}
.navmenu a:hover {
  color: white;
}
.navmenu .active,
.navmenu .active:focus,
.navmenu li:hover a i {
  color: var(--default-color) !important;
}

/* ===================================================================
   6. Main Content & Global Section Styles
=================================================================== */
main.main {
  margin-left: 300px;
}

section,
.section {
  /* color: #F2EBDF; */
  background-color: #F2EBDF !important;
  border-bottom: 3px solid var(--heading-color);
  border-radius:  24px ;
  box-shadow: #896c6c 1px 1px 5px;
  padding: 60px 0;
  overflow: clip;
  margin-bottom: 40px; /* Add space between sections */
}

.section-title {
  padding-bottom: 60px;
  position: relative;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 20px;
  position: relative;
}

.section-title h2:after {
  content: "";
  position: absolute;
  display: block;
  width: 90px;
  height: 3px;
  background: var(--heading-color);
  left: 0;
  bottom: 0;
}

/* Responsive Adjustments */
@media (max-width: 1199px) {
  .header {
    left: -100%;
  }
  main.main {
    margin-left: 0;
  }
}

/* ===================================================================
   7. Cover Section
=================================================================== */
#cover.cover-section {
  background: linear-gradient(135deg, var(--default-color) 0%, var(--heading-color) 100%);
  color: var(--contrast-color);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0px 0px 24px 24px;
}

#cover .container {
  width: 90% !important;
}

.cover-img {
  width: 300px !important;
  height: 300px !important;
  object-fit: cover;
  border: 4px solid var(--default-color);
  border-radius: 2rem 0rem;
}

/* ===================================================================
   8. About Section
=================================================================== */
.about-section {
  background: #f7f3f9;
  color: #F2EBDF;
}

#about .container {
  width: 90% !important;
}

/* ===================================================================
   9. Education Section
=================================================================== */
#education .container {
  width: 90% !important;
}

.education-section {
  background: #e9e3f0;
  color: #F2EBDF;
}

.education-card {
  border-left: 5px solid var(--accent-color);
  border-radius: 0.5rem;
  background: #fff;
}

.btn-view-certificate,
.btn-view-certificate:focus {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: #e9e3f0;
  transition: all 0.3s;
}

.btn-view-certificate:hover {
  color: var(--contrast-color);
  border-color: var(--accent-color);
  background: var(--accent-color);
}

/* ===================================================================
   10. Skills Section
=================================================================== */
#skills .container {
  width: 90% !important;
}
.skills-section {
  background: #e9e3f0;
  color: #F2EBDF;
}

.skill-branch-card {
  border-left: 4px solid var(--accent-color);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 2px 12px 0 rgba(110, 59, 110, 0.06);
  margin-bottom: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 1.25rem 0.75rem !important;
}

.skill-branch-card:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 4px 16px 0 rgba(110, 59, 110, 0.1);
}

.branch-icon {
  font-size: 1.7rem;
  color: var(--accent-color);
}

.branch-title {
  font-family: var(--heading-font);
  font-weight: 700;
  color: #3b2e4a;
  font-size: 1.1rem;
}

.skill-branch-card .badge {
  font-size: 0.85rem;
  background: var(--accent-color);
  color: #fff;
  font-weight: 500;
  border-radius: 0.4rem;
  padding: 0.35em 0.7em;
  letter-spacing: 0.02em;
}

/* ===================================================================
   11. Work Experience Section
=================================================================== */
#experience .container {
  width: 90% !important;
}
.experience-section {
  background: #F2EBDF;
  color: #171717;
}

.timeline {
  position: relative;
  margin: 2rem 0 0 0;
  padding-left: 36px;
  border-left: 4px solid #3b2e4a;
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.2rem;
  display: flex;
  align-items: flex-start;
  min-height: 48px;
}

.timeline-bullet {
  position: absolute;
  top: 0.6rem;
  left: -11px;
  width: 20px;
  height: 20px;
  background: #fff;
  border: 5px solid #3b2e4a;
  border-radius: 50%;
  display: block;
  box-shadow: 0 2px 8px rgba(59, 46, 74, 0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
  z-index: 2;
}

.timeline-item:hover .timeline-bullet,
.timeline-item:focus-within .timeline-bullet {
  border-color: var(--accent-color);
  box-shadow: 0 4px 16px rgba(110, 59, 110, 0.18);
}

.timeline-content {
  background: #f7f3f9;
  border-radius: 0.5rem;
  padding: 1.1rem 1.3rem;
  box-shadow: 0 2px 12px 0 rgba(59, 46, 74, 0.06);
  margin-left: 1.5rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.timeline-content h4 {
  color: #3b2e4a;
  font-size: 1.1rem;
  font-weight: 700;
}

.timeline-content h5 {
  font-size: 1rem;
}

.timeline-content ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.timeline-content li {
  font-size: 0.97rem;
  margin-bottom: 0.3rem;
}

@media (max-width: 575px) {
  .timeline {
    padding-left: 18px;
  }
  .timeline-bullet {
    left: -9px;
    width: 13px;
    height: 13px;
    border-width: 3px;
    top: 0.5rem;
  }
  .timeline-content {
    padding: 0.8rem 0.7rem;
    margin-left: 1rem;
  }
}

/* ===================================================================
   12. Services Section
=================================================================== */
#services .container {
  width: 90% !important;
}
.services-section {
  background: #e9e3f0;
  color: #F2EBDF;
}

.services .service-item .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  transition: all 0.3s;
  border: 2px solid transparent;
  margin-right: 20px;
  font-size: 1.7rem;
  box-shadow: 0 2px 12px 0 rgba(59, 46, 74, 0.08);
}

.service-icon-dev {
  background: #f3eaff;
  color: #d6a99d;
  border-color: #d6a99d;
}

.service-item:hover .service-icon-dev {
  background: #d6a99d;
  color: #fff;
  box-shadow: 0 4px 16px 0 rgba(110, 59, 110, 0.15);
}

.services .service-item .title {
  font-weight: 700;
  margin-bottom: 15px;
  font-size: 18px;
  color: #3b2e4a;
}

.services .service-item .description {
  line-height: 24px;
  font-size: 14px;
  color: #3b2e4a;
}

/* ===================================================================
   13. Projects (Portfolio) Section
=================================================================== */
#portfolio .container {
  width: 90% !important;
}
.portfolio-section {
  background: #f7f3f9;
  color: #F2EBDF;
}

.portfolio .portfolio-content {
  position: relative;
  overflow: hidden;
}

.portfolio .portfolio-content img {
  transition: 0.3s;
}

.portfolio .portfolio-content .portfolio-info {
  opacity: 0;
  position: absolute;
  inset: 0;
  z-index: 3;
  transition: all ease-in-out 0.3s;
  background: rgba(0, 0, 0, 0.6);
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.portfolio .portfolio-content .portfolio-info h4 {
  font-size: 20px;
  color: #fff;
  font-weight: 600;
}

.portfolio .portfolio-content .portfolio-info p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-bottom: 0;
}

.portfolio .portfolio-content .portfolio-info .details-link {
  font-size: 34px;
  line-height: 0;
  color: #fff;
  transition: 0.3s;
  margin-top: 10px;
}

.portfolio .portfolio-content .portfolio-info .details-link:hover {
  color: var(--accent-color);
}

.portfolio .portfolio-content:hover .portfolio-info {
  opacity: 1;
}

.portfolio .portfolio-content:hover img {
  transform: scale(1.1);
}

/* Modal Styles */
.modal-content {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 1.2rem;
}

.modal-header,
.modal-body .card {
  border-radius: 1.2rem;
}

.modal-body .card img {
  border-radius: 1.2rem 1.2rem 0 0;
}

/* ===================================================================
   14. Achievements Section
=================================================================== */
#achievements .container {
  width: 90% !important;
}
.achievements-section {
  background: #e9e3f0;
  color: #F2EBDF;
}

.achievement-icon i {
  color: var(--default-color);
}

/* ===================================================================
   15. Testimonials Section
=================================================================== */
#testimonials .container {
  width: 90% !important;
}
.testimonials-section {
  background: #f7f3f9;
  color: #F2EBDF;
}

.testimonials .testimonial-item {
  box-sizing: content-box;
  text-align: center;
  min-height: 320px;
}

.testimonials .testimonial-item .testimonial-img {
  width: 90px;
  border-radius: 50%;
  margin: 0 auto;
}

.testimonials .testimonial-item h3 {
  font-size: 18px;
  font-weight: bold;
  margin: 10px 0 5px 0;
}

.testimonials .testimonial-item .quote-icon-left,
.testimonials .testimonial-item .quote-icon-right {
  color: rgba(110, 59, 110, 0.4);
  font-size: 26px;
  line-height: 0;
}

.testimonials .testimonial-item p {
  font-style: italic;
  margin: 0 15px 15px 15px;
  padding: 20px;
  background-color: #fff;
  position: relative;
  margin-bottom: 35px;
  border-radius: 6px;
  box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
}

#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
  background-color: var(--accent-color);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  background-size: 60% 60%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  border: 3px solid #e9e3f0;
}

/* ===================================================================
   16. Contact Section
=================================================================== */
#contact .container {
  width: 90% !important;
}
.contact-section {
  background: #e9e3f0;
  color: #F2EBDF;
}

#contact {
  background-color: #f2ebdf !important;
}

.contact-title {
  color: #896c6c;
}

.info-card-bg {
  background: #fff;
  color: #3b2e4a;
}

.contact-icon {
  font-size: 2.5rem;
  color: #d6a99d;
  transition: color 0.3s, transform 0.3s;
}

.contact-icon:hover {
  color: #b97c6a !important;
  transform: scale(1.15);
}

.contact-label {
  font-size: 1.2rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.contact-link {
  display: inline-block;
  margin-top: 8px;
  color: #d6a99d;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s;
}

.contact-link:hover {
  color: #b97c6a !important;
}

/* ===================================================================
   17. Footer
=================================================================== */
.footer {
  color: var(--contrast-color);
  background-color: #2e2e38;
  font-size: 14px;
  padding: 40px ;
  padding-left: 20rem !important;
  position: relative;
  border-top: 1px solid rgba(137, 108, 108, 0.1);
}

.footer .copyright p {
  margin-bottom: 0;
}

.footer .credits {
  margin-top: 4px;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1199px) {
  .footer {
    padding-left: 2rem !important;
  }
}