@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&display=swap");

:root {
  /* Light mode (default) colors */
  --primary-color: #2506ad;
  --primary-color-hover: #1a047e;
  --secondary-color: #ff7b00;
  --accent-color: #730aa7;
  --accent-color-light: #6500b8;
  --text-color: #0e2431;
  --text-color-light: #666;
  --bg-color: #f7f7f7;
  --bg-color-alt: #fff;
  --bg-color-transparent: rgba(255, 255, 255, 0.8);
  --card-bg: #fff;
  --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --skills-gradient: linear-gradient(-45deg, #57059e, #4a00e0, #6500b8, #3c0080);
  --skills-card-bg: rgba(0, 0, 22, 0.9);
  --experience-timeline-bg: linear-gradient(to bottom, #020133, #450399, #020133);
  --footer-bg: rgb(0, 1, 43);
  --education-bg: #e5ecfb;
  --timeline-color: #f68c09;
  --card-hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  --scrollbar-track: rgb(235, 202, 245);
  --scrollbar-thumb: #420177;
  --filter-value: none;
  --icon-filter: none;
}

[data-theme="dark"] {
  /* Improved dark mode colors for better contrast and consistency */
  --primary-color: #7c3aed;
  --primary-color-hover: #9333ea;
  --secondary-color: #fb923c;
  --accent-color: #a78bfa;
  --accent-color-light: #c4b5fd;
  --text-color: #e5e7eb;
  --text-color-light: #9ca3af;
  --bg-color: #0f172a;
  --bg-color-alt: #1e293b;
  --bg-color-transparent: rgba(15, 23, 42, 0.95);
  --card-bg: #1e293b;
  --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
  --skills-gradient: linear-gradient(-45deg, #4c1d95, #6d28d9, #7c3aed, #5b21b6);
  --skills-card-bg: rgba(30, 41, 59, 0.95);
  --experience-timeline-bg: linear-gradient(to bottom, #1e293b, #5b21b6, #1e293b);
  --footer-bg: #020617;
  --education-bg: #1e293b;
  --timeline-color: #fb923c;
  --card-hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
  --scrollbar-track: #334155;
  --scrollbar-thumb: #7c3aed;
  --filter-value: none;
  --icon-filter: brightness(1.1);
  --navbar-mobile-bg: rgba(15, 23, 42, 0.98);
  --input-bg: #334155;
  --input-border: #475569;
  --button-hover: #9333ea;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  outline: none;
  border: none;
  text-transform: capitalize;
  transition: all 0.2s linear;
}
html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  background: var(--bg-color);
  font-family: "Poppins", sans-serif;
  color: var(--text-color);
}

*::selection {
  background: var(--primary-color);
  color: #fff;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

/* Modern scrollbar styling with fallback */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

html::-webkit-scrollbar {
  width: 0.8rem;
}
html::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
html::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
}

/* pre loader start */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  backdrop-filter: blur(10px);
}

.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  width: 100px;
  position: relative;
  transition: opacity 0.5s ease;
}

.loader .circle {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top: 4px solid #57059e;
  animation: spin 1s linear infinite;
}

.loader .circle:nth-child(2) {
  width: 60px;
  height: 60px;
  border-top-color: #4a00e0;
  animation-duration: 0.8s;
  animation-direction: reverse;
}

.loader .circle:nth-child(3) {
  width: 40px;
  height: 40px;
  border-top-color: #6500b8;
  animation-duration: 0.6s;
}

.loader .circle:nth-child(4) {
  width: 20px;
  height: 20px;
  border-top-color: #ff9f55;
  animation-duration: 0.4s;
  animation-direction: reverse;
}

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

.loader-container.fade-out {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
/* pre loader end */

/* navbar starts */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.7rem 10%;
  height: 6.5rem;
  background-color: var(--bg-color-transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

header.scrolled {
  height: 5.5rem;
  background-color: var(--bg-color-transparent);
  box-shadow: var(--card-shadow);
}

section {
  min-height: 100vh;
  padding: 6rem 9% 2rem;
  position: relative;
}

section:not(:last-child) {
  padding-bottom: 4rem;
}

.heading {
  font-size: 3.5rem;
  color: var(--text-color);
  font-weight: 800;
  text-align: center;
  position: relative;
  margin-bottom: 3rem;
}

.heading::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 10px;
}

.heading span {
  color: var(--secondary-color);
}

header .logo {
  font-size: 3rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-color);
}
header .logo i {
  font-size: 2.5rem;
}
header .logo:hover {
  color: var(--primary-color);
}
header .navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
header .navbar li {
  margin-left: 2.5rem;
}
header .navbar li:last-child {
  margin-left: 1.5rem;
  display: flex;
  align-items: center;
}
header .navbar ul li a {
  font-size: 1.57rem;
  color: var(--text-color);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04rem;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}
header .navbar ul li a.active,
header .navbar ul li a:hover {
  color: var(--primary-color);
  border-bottom: 0.2rem solid var(--primary-color);
  padding: 0.5rem 0;
}
/* navbar ends */

/* hamburger icon starts*/
#menu {
  font-size: 3rem;
  cursor: pointer;
  color: rgb(24, 2, 63);
  display: none;
}

/* Hide close button on desktop */
#close-navbar {
  display: none;
}

@media (max-width: 768px) {
  #menu {
    display: block;
  }
  
  header .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    text-align: left;
    align-items: flex-start;
    background-color: rgba(10, 10, 20, 0.98);
    transition: all 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
  }
  
  header .navbar::before {
    display: none;
  }
  
  /* Modernized close button design */
  #close-navbar {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background-color: rgba(98, 71, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
  }
  
  #close-navbar:hover {
    background-color: rgba(98, 71, 255, 0.4);
  }
  
  header .navbar ul {
    flex-flow: column;
    padding: 6rem 3rem 3rem 3rem;
  }
  
  header .navbar ul li {
    text-align: left;
    width: 100%;
    margin: 1.5rem 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s ease forwards;
  }
  
  header .navbar ul li:nth-child(1) { animation-delay: 0.1s; }
  header .navbar ul li:nth-child(2) { animation-delay: 0.2s; }
  header .navbar ul li:nth-child(3) { animation-delay: 0.3s; }
  header .navbar ul li:nth-child(4) { animation-delay: 0.4s; }
  header .navbar ul li:nth-child(5) { animation-delay: 0.5s; }
  header .navbar ul li:nth-child(6) { animation-delay: 0.6s; }
  header .navbar ul li:nth-child(7) { animation-delay: 0.7s; }
  header .navbar ul li:nth-child(8) { animation-delay: 0.8s; }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  header .navbar ul li a {
    display: block;
    padding: 1rem 0;
    text-align: left;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  header .navbar ul li a.active,
  header .navbar ul li a:hover {
    padding: 1rem 0;
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
    border-left: none;
    background: none;
  }
  
  /* Remove the fa-times transform */
  .fa-times {
    transform: none;
  }
  
  header .navbar.nav-toggle {
    right: 0;
  }
  
  header .navbar ul li:last-child {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
  }
  
  /* Dark mode mobile menu fixes */
  [data-theme="dark"] header .navbar {
    background-color: rgba(10, 10, 20, 0.98);
  }
  
  [data-theme="dark"] header .navbar ul li a.active,
  [data-theme="dark"] header .navbar ul li a:hover {
    border-bottom: 1px solid var(--primary-color);
    border-left: none;
    padding: 1rem 0;
  }
}
/* hamburger icon ends */

/* hero section starts*/
.home {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  min-height: 100vh;
  align-items: center;
  perspective: 1000px;
  overflow: hidden;
}
.home #particles-js {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}
.home::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}
.home::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 70%, rgba(115,3,167,0.1) 100%);
  pointer-events: none;
}
.home .content {
  flex: 1 1 40rem;
  padding-top: 1rem;
  z-index: 1;
}
.home .image {
  flex: 1 1 40rem;
  z-index: 1;
  position: relative;
}
.home .image img {
  width: 70%;
  margin-left: 6rem;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  animation: float 6s ease-in-out infinite;
}
.home .image img:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  animation-play-state: paused;
}
.home .image::before {
  display: none;
}
.home .content h2 {
  font-size: 5rem;
  font-weight: 800;
  color: var(--text-color);
}
.home .content h2 span {
  font-size: 5rem;
  font-weight: 800;
  color: var(--secondary-color);
}
.home .content p {
  font-size: 2.5rem;
  color: var(--text-color);
  font-weight: 600;
  padding: 1rem 0;
}
.home .content p span {
  font-size: 2.5rem;
  color: rgb(148, 8, 8);
  font-weight: 600;
  padding: 1rem 0;
}
.home .btn {
  margin-top: 1rem;
  position: absolute;
  line-height: 0;
  padding: 1.6rem 3rem;
  border-radius: 4em;
  transition: 0.5s;
  color: #fff;
  background: var(--primary-color);
  box-shadow: 0px 5px 18px rgba(48, 68, 247, 0.6);
  font-family: "Nunito", sans-serif;
}
.home .btn span {
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.1rem;
}
.home .btn i {
  margin-left: 0.3rem;
  font-size: 1.5rem;
  transition: 0.3s;
}
.home .btn:hover {
  background: var(--primary-color-hover);
}
.home .btn:hover i {
  transform: translateX(5px);
}
/* social icons start */
.socials {
  position: relative;
  margin-top: 9rem;
}
.socials .social-icons {
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}
.socials .social-icons li {
  display: inline-block;
  margin-bottom: 14px;
}
.social-icons a {
  font-size: 2rem;
  display: inline-block;
  line-height: 44px;
  color: #00d9ff;
  background-color: #09011b;
  width: 44px;
  height: 44px;
  text-align: center;
  margin-right: 8px;
  border-radius: 100%;
  transition: all 0.2s linear;
}
.social-icons a:active,
.social-icons a:focus,
.social-icons a:hover {
  color: #fff;
  background-color: #0685da;
}
.social-icons a.github:hover {
  background-color: #0e0e0e;
}
.social-icons a.twitter:hover {
  background-color: #00aced;
}
.social-icons a.linkedin:hover {
  background-color: #007bb6;
}
.social-icons a.dev:hover {
  background-color: #070707;
}
.social-icons a.instagram:hover {
  background-color: #ee00da;
}
/* social icons end */

/* hero media queries starts*/
@media (max-width: 450px) {
  .home .btn {
    margin: 4rem 0;
  }
  .socials {
    margin-top: 12rem;
  }
  .home .image img {
    margin-top: -12rem;
  }
  .home .content p {
    font-size: 2.2rem;
  }
  .home .content p span {
    font-size: 2.2rem;
  }
}
/* hero media queries ends*/
/* hero section end */

/* about section starts */
.about {
  position: relative;
  overflow: hidden;
  background: var(--bg-color-alt);
  z-index: 0;
}

.about::before {
  display: none;
}

.about .row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.about .row .image {
  flex: 1 1 25rem;
  text-align: center;
}

.about .row .content {
  flex: 1 1 40rem;
  padding: 1rem;
}

@media (max-width: 768px) {
  .about .row {
    flex-direction: column;
    gap: 3rem;
  }
  
  .about .row .image {
    margin: 0 auto;
    max-width: 300px;
  }
  
  .about .row .content {
    padding: 0;
  }
  
  .about .row .content .box-container {
    padding: 1rem 0;
  }
}

/* Use a consistent style for section backgrounds */
section::before,
section::after {
  pointer-events: none;
}

/* Extra dark mode fixes */
[data-theme="dark"] section {
  background-color: var(--bg-color);
}

[data-theme="dark"] section.about,
[data-theme="dark"] section.skills,
[data-theme="dark"] section.education,
[data-theme="dark"] section.experience {
  background-color: var(--bg-color-alt);
}

[data-theme="dark"] .about .row .image img {
  mix-blend-mode: normal;
}

@keyframes rotateBlob {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

.about .row .image img {
  margin: 4rem;
  width: 30rem;
  height: auto;
  border-radius: 5%;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.6);
  mix-blend-mode: luminosity;
  transition: 0.3s;
  cursor: pointer;
}
.about .row .image img:hover {
  mix-blend-mode: normal;
}
.about .row .content h3 {
  color: var(--text-color);
  font-size: 2.5rem;
}
.about .row .content .tag {
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 1rem;
}
.about .row .content p {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  font-family: "Nunito";
  font-weight: 600;
  text-transform: none;
  color: var(--text-color-light);
}
.about .row .content .box-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: "Nunito";
  font-weight: 600;
}
.about .row .content .box-container .box p {
  text-transform: none;
}
.about .row .content .box-container .box p span {
  color: var(--primary-color);
}
.resumebtn {
  margin-top: 6rem;
}
.resumebtn .btn {
  padding: 1.7rem 3rem;
  border-radius: 0.5em;
  transition: 0.3s;
  color: #fff;
  background: var(--primary-color);
  box-shadow: 0px 5px 10px rgba(48, 68, 247, 0.6);
  font-family: "Nunito", sans-serif;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.resumebtn .btn span {
  font-weight: 600;
  font-size: 1.8rem;
  letter-spacing: 0.1rem;
}

.resumebtn .btn i {
  margin-left: 0.3rem;
  font-size: 1.2rem;
  transition: 0.3s;
}

.resumebtn .btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: none;
  z-index: -1;
}

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

.resumebtn .btn:hover i {
  transform: translateX(5px);
}

/* Dark mode fixes for resume button */
[data-theme="dark"] .resumebtn .btn {
  background: var(--primary-color);
  box-shadow: 0 5px 15px rgba(98, 71, 255, 0.4);
  border: none;
  overflow: hidden;
}

[data-theme="dark"] .resumebtn .btn::after,
[data-theme="dark"] .resumebtn .btn::before {
  display: none !important;
  opacity: 0;
  background: none;
}

[data-theme="dark"] .resumebtn .btn:hover {
  background: var(--primary-color-hover);
  box-shadow: 0 8px 20px rgba(98, 71, 255, 0.6);
}

/* about media queries starts*/
@media screen and (max-width: 600px) {
  .about .row .image {
    margin-top: 2rem;
  }
  .about .row .image img {
    margin: 0 auto;
    width: 80%;
    mix-blend-mode: normal;
  }
  .about .row {
    padding: 0.5rem;
    margin-bottom: 7rem;
  }
  .about .row .content {
    padding: 1rem;
  }
  .about .row .content .box-container {
    gap: 0;
  }
}
/* about media queries ends*/
/* about section ends */

/* skills section starts */
.skills {
  min-height: 90vh;
  background: var(--skills-gradient);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  position: relative;
}
.skills h2 {
  color: #fff;
}
.skills .heading span {
  color: rgb(255, 230, 0);
}
.skills .container {
  background: var(--skills-gradient);
  border-radius: 1rem;
  padding: 3rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}
.skills .container .row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 2rem;
}
.skills .container .bar {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  background: var(--skills-card-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.skills .container .bar::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.skills .container .bar:hover {
  box-shadow: 0 8px 20px rgba(0, 2, 68, 0.8) !important;
  background-color: rgba(0, 0, 0, 0.9) !important;
  transform: translateY(-5px);
}
.skills .container .bar:hover::before {
  opacity: 1;
  animation: glowSweep 1s linear;
}
.skills .container .bar .info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.skills .container .bar .info i {
  font-size: 4rem;
}
.skills .container .bar .info span {
  font-size: 2rem;
  font-weight: 500;
  font-family: "Poppins";
  margin-left: 0.5rem;
  color: #fff;
}
/* skills media queries starts*/
@media screen and (max-width: 600px) {
  .skills .container {
    padding: 2rem;
  }
  
  .skills .container .row {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .skills .container .row {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
  }
}
/* skills media queries ends*/
/* skills section ends */

/* Dark mode fixes for skills section */
[data-theme="dark"] .skills {
  background: var(--skills-gradient);
}

[data-theme="dark"] .skills .container {
  background: rgba(20, 20, 30, 0.8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

[data-theme="dark"] .skills .container .bar {
  background: rgba(25, 25, 35, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .skills .container .bar:hover {
  background: rgba(35, 35, 50, 0.9) !important;
  box-shadow: 0 8px 25px rgba(98, 71, 255, 0.3) !important;
  border: 1px solid rgba(98, 71, 255, 0.2);
}

[data-theme="dark"] .skills .container .bar .info {
  color: var(--text-color);
}

[data-theme="dark"] .skills .container .bar .info span {
  color: #fff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* education section starts */
.education {
  background: var(--education-bg);
  min-height: 80vh;
}
.education .qoute {
  font-size: 1.5rem;
  text-align: center;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 3rem;
}
.education .box-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  justify-content: center;
  align-items: center;
}
.education .box-container .box {
  display: flex;
  flex-direction: row;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 900px;
}
[data-theme="dark"] .education .box-container .box {
  background: var(--card-bg);
}
.education .box-container .box:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}
.education .box-container .box .image {
  flex: 1 1 35%;
  max-width: 35%;
}
.education .box-container .box img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.education .box-container .box .content {
  flex: 1 1 65%;
  padding: 2rem;
}
.education .box-container .box .content h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  padding: 0.5rem 0;
  font-weight: 600;
}
.education .box-container .box .content p {
  font-size: 1.5rem;
  color: var(--text-color-light);
  padding: 0.5rem 0;
}
.education h4 {
  font-size: 2rem;
  color: rgb(34, 109, 0);
  padding: 0.5rem 0;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
}
[data-theme="dark"] .education h4 {
  color: #36d843;
}
@media screen and (max-width: 768px) {
  .education .box-container .box {
    flex-direction: column;
  }
  
  .education .box-container .box .image {
    max-width: 100%;
  }
}
/* education section ends */

/* projects section starts */
.projects {
    min-height: 100vh;
    background: var(--bg-color);
    padding: 5rem 0;
}

.projects .heading {
    margin-bottom: 3rem;
}

.projects .heading span {
    color: rgb(115, 3, 167);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin: 3rem auto;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.project-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    overflow: hidden;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

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

.project-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    text-align: center;
}

.project-content p {
    font-size: 1.4rem;
    color: var(--text-color-light);
    text-align: center;
    line-height: 1.6;
}

.projects .viewall {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.projects .viewall .btn {
    padding: 1.2rem 3rem;
    font-size: 1.6rem;
    border-radius: 0.5rem;
    background: var(--accent-color);
    color: #fff;
    text-transform: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.projects .viewall .btn:hover {
    background: var(--accent-color-light);
}

@media (max-width: 992px) {
    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    section.projects {
        padding: 5rem 1rem 2rem;
    }
}
/* projects section ends */

/* experience section starts */
.experience {
    min-height: 100vh;
    padding-top: 3rem;
    padding-bottom: 3rem;
    background: var(--education-bg);
}

.experience .heading {
    margin-bottom: 4rem;
}

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

.experience .timeline::after {
  content: "";
  position: absolute;
  width: 6px;
  background: var(--experience-timeline-bg);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  z-index: 0;
  box-shadow: 0 0 10px rgba(115, 3, 167, 0.5);
}

.experience .container {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
  z-index: 10;
}

/*circles on timeline*/
.experience .container::after {
  content: "\f0b1";
  position: absolute;
  width: 25px;
  height: 25px;
  right: -17px;
  background-color: var(--bg-color-alt);
  border: 4px solid var(--timeline-color);
  top: 15px;
  border-radius: 50%;
  z-index: 200;
  font-size: 1.89rem;
  text-align: center;
  font-weight: 600;
  color: #02094b;
  font-family: "Font Awesome\ 5 Free";
  box-shadow: 0 0 10px rgba(255, 159, 85, 0.7);
  animation: pulse 1.5s infinite;
}

/* Fix for dark mode suitcase icons */
[data-theme="dark"] .experience .container::after {
  color: #fff;
  background-color: #6247ff;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 159, 85, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 159, 85, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 159, 85, 0);
  }
}

.experience .left {
  left: 0;
  z-index: 10;
}

.experience .right {
  left: 50%;
  z-index: 10;
}

/* arrows pointing right */
.experience .left::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  right: 30px;
  border: medium solid var(--timeline-color);
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent var(--timeline-color);
}

/* arrows pointing left  */
.experience .right::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  left: 30px;
  border: medium solid var(--timeline-color);
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--timeline-color) transparent transparent;
}

.experience .right::after {
  left: -16px;
}

.experience .content {
  background-color: var(--timeline-color);
  position: relative;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.experience .content .tag {
  font-size: 1.3rem;
  padding-top: 1.5rem;
  padding-left: 1.5rem;
}

.experience .content .desc {
  margin-left: 1.5rem;
  padding-bottom: 1rem;
}

.experience .content .desc h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

.experience .content .desc p {
  font-size: 1.2rem;
}

/* Experience section media queries */
@media screen and (max-width: 600px) {
  .experience {
    min-height: 80vh;
  }
  .experience .timeline {
    margin-top: 2rem;
  }
  .experience .timeline::after {
    left: 31px;
  }
  .experience .container {
    width: 100%;
    padding-left: 3rem;
    padding-right: 1rem;
  }
  .experience .container::after {
    font-size: 2.2rem;
  }
  .experience .container::before {
    left: 61px;
    border: medium solid var(--timeline-color);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--timeline-color) transparent transparent;
  }
  .experience .left::after {
    left: 15px;
  }
  .experience .right::after {
    left: 15px;
  }
  .experience .right {
    left: 0%;
  }
}
/* experience media queries ends */
/* experience section ends */

/* contact section starts */
.contact {
    min-height: 60vh;
    padding-top: 3rem;
    padding-bottom: 3rem;
    background: var(--education-bg);
}

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

.contact .container {
  max-width: 1050px;
  width: 90%;
  background: var(--card-bg);
  border-radius: 1.5rem;
  margin: 2rem auto;
  box-shadow: var(--card-shadow);
}

.contact .container .content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem 2rem;
}

.contact .content .image-box {
  max-width: 60%;
  margin-left: 4rem;
}

.contact .content .image-box img {
  width: 100%;
  height: 40rem;
  position: relative;
}

.contact .content .form-container {
  width: 45%;
  margin-right: 3.5rem;
  position: relative;
}

.contact .content form {
  width: 100%;
}

.form-group .field {
  height: 50px;
  display: flex;
  position: relative;
  margin: 1rem;
  width: 100%;
}

/* Base icon styling */
form i {
  position: absolute;
  top: 50%;
  left: 15px;
  color: var(--text-color);
  font-size: 17px;
  pointer-events: none;
  transform: translateY(-50%);
  z-index: 1;
}

form .field input,
form .message textarea {
  width: 100%;
  height: 100%;
  outline: none;
  padding: 0 16px 0 48px;
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  border-radius: 5px;
  border: 1px solid var(--text-color);
  background: var(--education-bg);
}

.field input::placeholder,
.message textarea::placeholder {
  color: var(--text-color);
}

.field input:focus,
.message textarea:focus {
  padding-left: 47px;
  border: 2px solid var(--primary-color);
}

.field input:focus ~ i,
.message textarea:focus ~ i {
  color: var(--primary-color);
}

form .message {
  position: relative;
  margin: 1rem;
  width: 100%;
}

form .message i {
  top: 25px;
  transform: none;
}

form .message textarea {
  min-height: 130px;
  max-height: 230px;
  max-width: 100%;
  min-width: 100%;
  padding: 12px 20px 0 48px;
  scrollbar-width: none; /* Firefox */
}

form .message textarea::-webkit-scrollbar {
  width: 0px; /* Chrome, Safari, Edge */
}

form .button-area {
  display: flex;
  float: right;
  flex-direction: row-reverse;
}

.button-area button {
  color: #fff;
  border: none;
  outline: none;
  font-size: 1.8rem;
  cursor: pointer;
  border-radius: 5px;
  padding: 13px 25px;
  background: var(--primary-color);
  box-shadow: 0px 5px 10px rgba(48, 68, 247, 0.5);
  transition: all 0.3s ease;
  font-family: "Nunito", sans-serif;
  position: relative;
  overflow: hidden;
  min-width: 140px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.button-area button:hover {
  background: var(--primary-color-hover);
  transform: translateY(-2px);
  box-shadow: 0px 7px 14px rgba(48, 68, 247, 0.4);
}

.button-area button:active {
  transform: translateY(0);
  box-shadow: 0px 5px 8px rgba(48, 68, 247, 0.5);
}

.button-area button:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.button-area button.loading {
  cursor: wait;
}

/* Clean loading spinner for submit button */
.loader-circle {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.button-area button i {
  margin-left: 5px;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.button-area button:hover i {
  transform: translateX(3px);
}

.button-area span {
  font-size: 17px;
  padding: 1rem;
  display: none;
}

/* contact section media queries starts */
@media (max-width: 768px) {
  .contact {
    min-height: 70vh;
  }
  .contact .container {
    margin: 3rem 0 2rem 0;
  }
  .contact .container .content {
    padding: 18px 12px;
  }
  .contact .content .image-box {
    display: none;
  }
  .contact .content .form-container {
    width: 100%;
    margin-right: 2rem;
  }
}
/* contact section media queries ends */
/* contact section ends */

/* Success and error messages for contact form */
#response-message {
  margin-top: 2rem;
  display: none;
  width: 100%;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: #f9f9f9;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  z-index: 100;
  overflow: hidden;
}

#response-message .success-message,
#response-message .error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.5rem;
}

#response-message .success-message i {
  font-size: 3rem;
  color: #28a745;
}

#response-message .error-message i {
  font-size: 3rem;
  color: #dc3545;
}

#response-message p {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
}

/* Animation for response message */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#response-message.visible {
  display: block;
  animation: slideDown 0.3s ease forwards;
}

/* Dark mode styles for response messages */
[data-theme="dark"] #response-message {
  background-color: #2a2a40;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #response-message p {
  color: #f0f0f0;
}

/* Mobile styles for response messages */
@media (max-width: 768px) {
  #response-message {
    position: relative;
    left: 0;
    transform: none;
    margin: 2rem auto 0;
    width: 100%;
  }
}

/* footer section starts */
.footer {
  min-height: auto;
  padding-top: 0;
  background: var(--footer-bg);
}
.footer .box-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.footer .box-container .box {
  flex: 1 1 25rem;
  margin: 2.5rem;
}
.footer .box-container .box h3 {
  font-size: 2.5rem;
  color: #fff;
  padding-bottom: 1rem;
  font-weight: normal;
}
.footer .box-container .box p {
  font-size: 1.5rem;
  color: #ccc;
  padding: 0.7rem 0;
  text-transform: none;
}
.footer .box-container .box p i {
  padding-right: 1rem;
  color: #ffae00;
}
.footer .box-container .box a {
  font-size: 1.5rem;
  color: rgb(238, 238, 238);
  padding: 0.3rem 0;
  display: block;
}
.footer .box-container .box a:hover {
  color: #ffae00;
}
.footer .box-container .box .share {
  display: flex;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.footer .box-container .box .share a {
  height: 4rem;
  width: 4rem;
  padding: 1rem;
  text-align: center;
  border-radius: 5rem;
  font-size: 1.7rem;
  margin-right: 1rem;
  transition: 0.2s;
  background: rgb(230, 230, 230);
  color: #02094b;
  border: none;
}
.footer .box-container .box .share a:hover {
  background: transparent;
  transform: scale(0.98);
  border: 0.1rem solid rgb(180, 178, 178);
  color: #ffae00;
}
.footer .credit {
  padding: 1rem 0 0 0;
  text-align: center;
  font-size: 1.5rem;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  color: #fff;
  border-top: 0.1rem solid #fff3;
}
.footer .credit a {
  color: #ffae00;
}
.footer .fa {
  color: #e90606;
  margin: 0 0.3rem;
  font-size: 1.5rem;
  animation: pound 0.35s infinite alternate;
}
@-webkit-keyframes pound {
  to {
    transform: scale(1.1);
  }
}
@keyframes pound {
  to {
    transform: scale(1.1);
  }
}
@media (max-width: 450px) {
  .footer .box-container .box {
    margin: 1.5rem;
  }
  .footer .box-container .box p {
    padding: 0.7rem;
  }
  .footer .box-container .box .share a {
    padding: 1.2rem;
  }
}
/* footer section ends */

/* common media queries starts*/
@media (max-width: 450px) {
  html {
    font-size: 55%;
  }
  body {
    padding-right: 0;
  }
  section {
    padding: 2rem;
  }
}
/* common media queries ends*/

/* scroll top starts */
#scroll-top {
  position: fixed;
  top: -140%;
  right: 2rem;
  padding: 1rem 1.5rem;
  font-size: 2rem;
  background: #ffae00;
  color: rgb(13, 0, 44);
  border-radius: 50%;
  transition: 1s linear;
  z-index: 1000;
}
#scroll-top.active {
  top: calc(100% - 12rem);
}
/* scroll top ends */

/* Animation keyframes */
@keyframes glowSweep {
    0% {
        transform: rotate(45deg) translateX(-150%);
    }
    100% {
        transform: rotate(45deg) translateX(150%);
    }
}

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

@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(115, 3, 167, 0.3),
                    0 0 0 1px rgba(115, 3, 167, 0.3),
                    0 0 0 3px rgba(115, 3, 167, 0.3),
                    0 0 0 5px rgba(115, 3, 167, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(115, 3, 167, 0.3),
                    0 0 0 5px rgba(115, 3, 167, 0.3),
                    0 0 0 10px rgba(115, 3, 167, 0.3),
                    0 0 0 20px rgba(115, 3, 167, 0);
    }
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Global button fixes */
.btn::before, .btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  transition: all 0.3s ease;
  opacity: 0;
}

[data-theme="dark"] button::before,
[data-theme="dark"] button::after,
[data-theme="dark"] .btn::before,
[data-theme="dark"] .btn::after {
  display: none !important;
  opacity: 0;
  background: none;
}

/* Improved theme toggle CSS */
.theme-toggle {
  width: 56px;
  height: 28px;
  background-color: var(--card-bg);
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.25);
  padding: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.theme-toggle:hover {
  box-shadow: inset 0 0 10px rgba(0,0,0,0.35), 0 0 8px var(--primary-color);
}

.theme-toggle i {
  position: absolute;
  font-size: 13px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.theme-toggle i.fa-sun {
  left: 7px;
  color: #fbbf24;
  opacity: 1;
}

.theme-toggle i.fa-moon {
  right: 7px;
  color: #cbd5e1;
  opacity: 0.4;
}

[data-theme="dark"] .theme-toggle i.fa-sun {
  opacity: 0.4;
}

[data-theme="dark"] .theme-toggle i.fa-moon {
  color: #e0e7ff;
  opacity: 1;
}

.theme-toggle .toggle-ball {
  position: absolute;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-hover));
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

[data-theme="dark"] .theme-toggle .toggle-ball {
  transform: translateX(28px) translateY(-50%);
  background: linear-gradient(135deg, #7c3aed, #9333ea);
}

/* Mobile toggle adjustments */
@media (max-width: 768px) {
  .theme-toggle {
    margin-left: 0;
    margin-top: 1rem;
  }
  
  [data-theme="dark"] .navbar {
    background-color: var(--navbar-mobile-bg) !important;
  }
  
  [data-theme="dark"] #menu {
    color: var(--text-color);
  }
}

/* Fix hover effects in dark mode */
[data-theme="dark"] .social-icons a {
  color: #e5e7eb;
  background-color: #334155;
  border: 1px solid #475569;
}

[data-theme="dark"] .social-icons a:hover {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

/* Better button styling for dark mode */
[data-theme="dark"] .btn {
  background: var(--primary-color);
  color: #fff;
  border: 2px solid var(--primary-color);
}

[data-theme="dark"] .btn:hover {
  background: var(--button-hover);
  border-color: var(--button-hover);
  box-shadow: 0 5px 20px rgba(124, 58, 237, 0.4);
}

[data-theme="dark"] .resumebtn .btn {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

[data-theme="dark"] .resumebtn .btn:hover {
  background: linear-gradient(135deg, var(--button-hover), var(--accent-color-light));
  transform: scale(1.05);
}

/* Make sure text doesn't move */
.home .content h2, 
.home .content p {
  transform: none !important;
}

.home .image img {
  transform: none !important;
}

/* Better mobile support for dark mode */
@media (max-width: 768px) {
  [data-theme="dark"] .navbar {
    background-color: var(--navbar-mobile-bg);
  }
}

/* Add a transition animation between light/dark mode switch */
html {
  transition: background-color 0.5s ease, color 0.5s ease;
}

body, 
header, 
section, 
.card, 
.btn,
.project-card,
.social-icons a,
.education .box-container .box,
.skills .container .bar,
.contact .container,
footer {
  transition: 
    background-color 0.5s ease, 
    color 0.5s ease, 
    border-color 0.5s ease, 
    box-shadow 0.5s ease;
}

/* Improve text contrast in dark mode */
[data-theme="dark"] {
  color-scheme: dark;
}

/* Dark mode form improvements */
[data-theme="dark"] .contact .container .content form .field input,
[data-theme="dark"] .contact .container .content form .message textarea,
[data-theme="dark"] form .field input,
[data-theme="dark"] form .message textarea {
  background-color: var(--input-bg);
  color: var(--text-color);
  border-color: var(--input-border);
}

[data-theme="dark"] .contact .container .content form .field input:focus,
[data-theme="dark"] .contact .container .content form .message textarea:focus,
[data-theme="dark"] form .field input:focus,
[data-theme="dark"] form .message textarea:focus {
  border-color: var(--primary-color);
  background-color: #3b4557;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

[data-theme="dark"] .contact .container .content form .field input::placeholder,
[data-theme="dark"] .contact .container .content form .message textarea::placeholder {
  color: #9ca3af;
}

/* Add subtle animation to button */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shinyButton 3s linear infinite;
}

@keyframes shinyButton {
  to {
    transform: rotate(30deg) translate(0, 100%);
  }
}

@keyframes morphBlob {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: translate(0, 0) scale(1);
  }
  33% {
    border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
    transform: translate(5px, 5px) scale(1.05);
  }
  66% {
    border-radius: 40% 60% 30% 70% / 50% 60% 40% 50%;
    transform: translate(-5px, -5px) scale(0.95);
  }
  100% {
    border-radius: 60% 40% 40% 60% / 40% 50% 50% 60%;
    transform: translate(0, 0) scale(1);
  }
}

/* Improved dark mode styling for project cards */
[data-theme="dark"] .project-card {
  background-color: var(--card-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .project-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .project-content h3 {
  color: var(--text-color);
}

[data-theme="dark"] .project-content p {
  color: var(--text-color-light);
}

/* Better navbar styling for dark mode */
[data-theme="dark"] header {
  background-color: var(--bg-color-transparent);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] header.scrolled {
  background-color: var(--bg-color-transparent);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] header .logo {
  color: var(--text-color);
}

[data-theme="dark"] header .logo:hover {
  color: var(--primary-color);
}

[data-theme="dark"] #menu {
  color: var(--text-color);
}

@media (max-width: 768px) {
  [data-theme="dark"] .navbar {
    background-color: var(--navbar-mobile-bg);
  }
}

/* Fix navbar links in dark mode */
[data-theme="dark"] header .navbar ul li a {
  color: var(--text-color);
}

[data-theme="dark"] header .navbar ul li a.active,
[data-theme="dark"] header .navbar ul li a:hover {
  color: var(--primary-color);
  border-bottom: 0.2rem solid var(--primary-color);
  background: none;
  padding: 0.5rem 0;
}

@media (max-width: 768px) {
  [data-theme="dark"] header .navbar ul li a.active,
  [data-theme="dark"] header .navbar ul li a:hover {
    border-bottom: 0.5rem solid var(--primary-color);
    background: none;
  }
}

/* Fix for experience section in mobile layout */
@media (max-width: 768px) {
  .experience .timeline {
    padding: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  
  .experience .timeline::after {
    left: 30px;
  }
  
  .experience .container {
    width: calc(100% - 60px);
    padding-left: 60px;
    padding-right: 0;
    margin: 2rem auto;
  }
  
  .experience .container::after {
    left: 15px;
  }
  
  .experience .container::before {
    left: 60px;
  }
  
  .experience .right {
    left: 0;
  }
}

/* Fix for Get In Touch section in mobile layout */
@media (max-width: 768px) {
  .contact .container {
    max-width: 100%;
    padding: 2rem 1rem;
  }
  
  .contact .container .content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  
  .contact .content .form-container {
    width: 100%;
    margin: 0 auto;
    max-width: 95%;
  }
  
  .contact .content form {
    width: 100%;
  }
  
  .contact .content .image-box {
    width: 100%;
    max-width: 280px;
    margin-bottom: 2rem;
  }
  
  /* Center the form elements better */
  .contact .content .field input, 
  .contact .content .message textarea {
    width: 100%;
    padding: 0.8rem 1rem;
  }
  
  /* Center the submit button */
  .contact .content .button-area {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
  }
  
  /* Center the response message */
  #response-message {
    width: 100%;
    margin: 2rem auto 0;
  }
  
  /* Fix the heading alignment */
  .contact h2.heading {
    text-align: center;
    margin-bottom: 2rem;
  }
}

/* Mobile specific fixes for contact form */
@media (max-width: 768px) {
  /* Completely hide icons in mobile view */
  .field i, 
  .message i {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    z-index: -999 !important;
    pointer-events: none !important;
  }
  
  /* Adjust padding since icons are gone */
  form .field input,
  form .message textarea {
    padding: 0 16px !important;
  }
  
  form .field input:focus,
  form .message textarea:focus {
    padding: 0 16px !important;
  }
  
  form .message textarea {
    padding: 10px 16px !important;
  }
}
