@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  outline: none;
  border: none;
  text-transform: capitalize;
  transition: all 0.2s linear;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #64748b;
  --dark: #0f172a;
  --light: #f8fafc;
  --gray: #94a3b8;
  --bg: #ffffff;
  --text: #1e293b;
  --card-bg: #ffffff;
  --shadow: 0 10px 30px -15px rgba(2,12,27,0.7);
  --text-light: #1e293b;
}

/* Dark mode variables */
body.dark-mode {
  --primary: #818cf8;
  --primary-dark: #6366f1;
  --secondary: #cbd5e1;
  --dark: #f8fafc;
  --light: #1e293b;
  --gray: #334155;
  --bg: #0f172a;
  --text: #f1f5f9;
  --card-bg: #1e293b;
  --shadow: 0 10px 30px -15px rgba(0,0,0,0.5);
  --text-light: #e2e8f0;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  font-family: 'Poppins', sans-serif;
  color: var(--text);
}

::selection {
  background: var(--primary);
  color: #fff;
}

html::-webkit-scrollbar {
  width: 0.8rem;
}
html::-webkit-scrollbar-track {
  background: var(--light);
}
html::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

/* Preloader */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}
.loader-container.fade-out {
  top: -120%;
}
.loader {
  border: 5px solid var(--gray);
  border-top-color: var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Navbar */
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: var(--bg);
  box-shadow: 0 1px 4px rgba(146, 161, 176, 0.3);
}
header .logo {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
}
header .logo i {
  font-size: 2.4rem;
  color: var(--primary);
}
header .logo span {
  color: var(--primary);
}
header .navbar ul {
  list-style: none;
  display: flex;
}
header .navbar ul li {
  margin-left: 2.5rem;
}
header .navbar ul li a {
  font-size: 1.6rem;
  color: var(--dark);
  font-weight: 600;
  transition: 0.2s;
}
header .navbar ul li a.active,
header .navbar ul li a:hover {
  color: var(--primary);
  border-bottom: 0.2rem solid var(--primary);
  padding-bottom: 0.5rem;
}

/* Theme toggle button */
.theme-toggle {
  cursor: pointer;
  font-size: 2rem;
  color: var(--dark);
  margin-left: auto;
  margin-right: 2rem;
}
.theme-toggle i {
  pointer-events: none;
}

#menu {
  font-size: 3rem;
  cursor: pointer;
  color: var(--dark);
  display: none;
}
@media (max-width: 768px) {
  #menu {
    display: block;
  }
  .theme-toggle {
    margin-right: 1rem;
  }
  header .navbar {
    position: fixed;
    top: 6.5rem;
    right: -120%;
    width: 75%;
    height: 100%;
    background: var(--dark);
    transition: 0.3s ease;
  }
  header .navbar ul {
    flex-flow: column;
    padding: 2rem;
  }
  header .navbar ul li {
    margin: 1.5rem 0;
    text-align: center;
    width: 100%;
  }
  header .navbar ul li a {
    color: #fff;
    display: block;
    font-size: 2rem;
  }
  header .navbar ul li a.active,
  header .navbar ul li a:hover {
    color: var(--primary);
    border-bottom: none;
  }
  .fa-times {
    transform: rotate(180deg);
  }
  header .navbar.nav-toggle {
    right: 0;
  }
}

/* Home Section */
.home {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  min-height: 100vh;
  align-items: center;
  padding: 2rem 9%;
}
.home #particles-js {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 1;
}
.home .content {
  flex: 1 1 40rem;
  z-index: 2;
}
.home .image {
  flex: 1 1 40rem;
  z-index: 2;
}
.home .image img {
  width: 70%;
  margin-left: 6rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  object-fit: cover;
  transition: 0.3s;
}
.home .image img:hover {
  box-shadow: 0 15px 40px var(--primary);
}
.home .content h2 {
  font-size: 5rem;
  font-weight: 800;
  color: var(--dark);
}
.home .content h2 span {
  color: var(--primary);
}
.home .content p {
  font-size: 2.5rem;
  color: var(--secondary);
  font-weight: 600;
  padding: 1rem 0;
}
.home .content p span {
  color: var(--primary);
}
.home .btn {
  margin-top: 1rem;
  padding: 1.6rem 3rem;
  border-radius: 4em;
  background: var(--primary);
  color: #fff;
  display: inline-block;
  font-weight: 700;
  font-size: 1.6rem;
  box-shadow: 0 5px 18px rgba(99,102,241,0.6);
}
.home .btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}
.home .btn i {
  margin-left: 0.5rem;
}
.socials {
  margin-top: 3rem;
}
.socials .social-icons {
  list-style: none;
  display: flex;
}
.socials .social-icons li {
  margin-right: 1.5rem;
}
.social-icons a {
  font-size: 2.5rem;
  color: var(--gray);
  transition: 0.3s;
}
.social-icons a:hover {
  color: var(--primary);
  transform: translateY(-5px);
}
@media (max-width: 768px) {
  .home .image img {
    margin-top: 2rem;
    width: 60%;
    margin-left: 0;
  }
}

/* About Section */
.about {
  padding: 5rem 9%;
  background: var(--light);
}
.heading {
  font-size: 3.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--dark);
}
.heading span {
  color: var(--primary);
}
.about .row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}
.about .row .image {
  flex: 1 1 35rem;
  text-align: center;
}
.about .row .image img {
  width: 80%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  object-fit: cover;
}
.about .row .content {
  flex: 1 1 45rem;
}
.about .row .content h3 {
  font-size: 3rem;
  color: var(--dark);
}
.about .row .content .tag {
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 600;
  margin: 1rem 0;
}
.about .row .content p {
  font-size: 1.6rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
}
.about .row .content .box-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem 0;
}
.about .row .content .box-container .box p {
  font-size: 1.6rem;
  color: var(--dark);
}
.about .row .content .box-container .box p span {
  color: var(--primary);
  font-weight: 600;
}
.resumebtn .btn {
  padding: 1.5rem 3rem;
  border-radius: 4em;
  background: var(--primary);
  color: #fff;
  font-size: 1.6rem;
}
.resumebtn .btn:hover {
  background: var(--primary-dark);
}
.resumebtn .btn i {
  margin-left: 0.5rem;
}

/* Skills Section (redesigned) */
.skills {
  padding: 5rem 9%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.skills .heading {
  color: #fff;
}
.skills .container {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
  border-radius: 1rem;
  padding: 3rem;
  width: 90%;
  margin: 0 auto;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
}
.skills-category h3 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  padding-bottom: 0.8rem;
}
.skill-item {
  margin-bottom: 1.8rem;
}
.skill-item span {
  display: block;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.progress-bar {
  background: rgba(255,255,255,0.2);
  height: 2rem;
  border-radius: 1rem;
  overflow: hidden;
  width: 100%;
}
.progress-bar div {
  background: #fff;
  height: 100%;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-dark);
}
.additional-skills {
  text-align: center;
  margin-top: 3rem;
  color: #fff;
  font-size: 1.6rem;
  background: rgba(0,0,0,0.2);
  padding: 1rem;
  border-radius: 3rem;
}
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Education Section */
.education {
  padding: 5rem 9%;
  background: var(--bg);
}
.education .quote {
  font-size: 1.6rem;
  text-align: center;
  color: var(--secondary);
  margin-bottom: 3rem;
}
.education .box-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.education .box-container .box {
  display: flex;
  background: var(--light);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.education .box-container .box .image {
  flex: 1 1 20rem;
}
.education .box-container .box .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.education .box-container .box .content {
  flex: 1 1 70rem;
  padding: 2rem;
}
.education .box-container .box .content h3 {
  font-size: 2.2rem;
  color: var(--dark);
  margin-bottom: 1rem;
}
.education .box-container .box .content p {
  font-size: 1.6rem;
  color: var(--secondary);
}
.education .box-container .box .content h4 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-top: 1rem;
}
@media (max-width: 768px) {
  .education .box-container .box {
    flex-direction: column;
  }
}

/* Work / Projects Section */
.work {
  padding: 5rem 9%;
  background: var(--light);
}
.work .box-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}
.work .box-container .box {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card-bg);
  transition: 0.3s;
}
.work .box-container .box:hover {
  transform: translateY(-10px);
}
.work .box-container .box img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.work .box-container .box .content {
  padding: 1.5rem;
}
.work .box-container .box .content .tag h3 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.work .box-container .box .content .desc p {
  font-size: 1.4rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}
.work .box-container .box .content .desc .btns {
  display: flex;
  gap: 1rem;
}
.work .box-container .box .content .desc .btns .btn {
  padding: 0.8rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: 2rem;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.work .box-container .box .content .desc .btns .btn:hover {
  background: var(--primary-dark);
}
.work .viewall {
  text-align: center;
  margin-top: 2rem;
}
.work .viewall .btn {
  padding: 1.2rem 3rem;
  background: var(--primary);
  color: #fff;
  border-radius: 3rem;
  font-size: 1.6rem;
}

/* Contact Section */
.contact {
  padding: 5rem 9%;
  background: var(--light);
}
.contact .container {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}
.contact .content {
  display: flex;
  align-items: center;
  padding: 2rem;
}
.contact .image-box {
  flex: 1;
  margin-right: 2rem;
}
.contact .image-box img {
  width: 100%;
}
.contact form {
  flex: 1;
}
.form-group .field {
  position: relative;
  margin-bottom: 1.5rem;
}
.form-group .field input,
.form-group .message textarea {
  width: 100%;
  padding: 1.2rem 1.2rem 1.2rem 4rem;
  border: 1px solid var(--gray);
  border-radius: 5px;
  font-size: 1.4rem;
  background: var(--bg);
  color: var(--text);
}
.form-group .field i,
.form-group .message i {
  position: absolute;
  top: 50%;
  left: 1.5rem;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 1.6rem;
}
.form-group .message {
  position: relative;
}
.form-group .message textarea {
  resize: vertical;
  min-height: 100px;
}
.button-area button {
  padding: 1.2rem 3rem;
  background: var(--primary);
  color: #fff;
  border-radius: 3rem;
  font-size: 1.6rem;
  cursor: pointer;
  border: none;
}
.button-area button:hover {
  background: var(--primary-dark);
}
@media (max-width: 768px) {
  .contact .content {
    flex-direction: column;
  }
  .contact .image-box {
    margin-right: 0;
    margin-bottom: 2rem;
  }
}

/* Footer */
.footer {
  background: var(--dark);
  color: #fff;
  padding: 4rem 9% 2rem;
}
.footer .box-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}
.footer .box-container .box {
  flex: 1 1 25rem;
}
.footer .box-container .box h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}
.footer .box-container .box p {
  font-size: 1.4rem;
  color: #ccc;
}
.footer .box-container .box a {
  display: block;
  font-size: 1.4rem;
  color: #ccc;
  margin: 0.5rem 0;
}
.footer .box-container .box a i {
  color: var(--primary);
  margin-right: 0.5rem;
}
.footer .box-container .box .share {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.footer .box-container .box .share a {
  width: 40px;
  height: 40px;
  background: #fff;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.8rem;
}
.footer .box-container .box .share a:hover {
  background: var(--primary);
  color: #fff;
}
.footer .credit {
  text-align: center;
  font-size: 1.6rem;
  padding-top: 2rem;
  border-top: 1px solid #444;
  margin-top: 2rem;
  color: #ccc;
}
.footer .credit a {
  color: var(--primary);
}

/* Scroll to top */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary);
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 100;
}
#scroll-top.active {
  opacity: 1;
  visibility: visible;
}/* ... (keep all existing CSS up to the scroll-top) ... */

/* ===== Skills Section Redesign ===== */
.skills {
  padding: 5rem 9%;
  background: var(--light);
}
.skills .heading {
  color: var(--dark);
}
.skills .skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}
.skill-category {
  background: var(--card-bg);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}
.skill-category:hover {
  transform: translateY(-5px);
}
.skill-category h3 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--light-gray);
}
.skill-item {
  margin-bottom: 2rem;
}
.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}
.skill-header span {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text);
}
.skill-bar {
  width: 100%;
  height: 1rem;
  background: var(--light-gray);
  border-radius: 0.5rem;
  overflow: hidden;
}
.skill-progress {
  height: 100%;
  background: var(--primary);
  border-radius: 0.5rem;
  width: 0;
  transition: width 1.5s ease-in-out;
}
/* Animation class added via JS */
.skill-progress.animate {
  width: var(--target-width);
}
.additional-skills {
  text-align: center;
  margin-top: 3rem;
  color: var(--text);
  font-size: 1.6rem;
  background: var(--light-gray);
  padding: 1rem 2rem;
  border-radius: 3rem;
  display: inline-block;
  width: auto;
  margin-left: auto;
  margin-right: auto;
}
body.dark-mode .skill-category {
  background: var(--card-bg);
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}
body.dark-mode .skill-header span {
  color: var(--text-light);
}
body.dark-mode .additional-skills {
  background: var(--gray);
  color: var(--light);
}

/* ===== Larger Dark Mode Toggle ===== */
.theme-toggle {
  cursor: pointer;
  font-size: 2.4rem;        /* increased size */
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--light-gray);
  color: var(--dark);
  transition: all 0.3s ease;
  margin-left: auto;
  margin-right: 2rem;
}
.theme-toggle:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}
body.dark-mode .theme-toggle {
  background: var(--gray);
  color: var(--light);
}
@media (max-width: 768px) {
  .theme-toggle {
    font-size: 2rem;
    width: 4rem;
    height: 4rem;
    margin-right: 1rem;
  }
}
/* Ensure header items are properly spaced */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* ... rest of existing CSS ... */