:root {
  --bg-color: #f5f7fa;
  --text-color: #22223b;
  --link-color: #3a86ff;
  --link-hover-color: #ffbe0b;
  --card-bg-color: #ffffff;
  --card-text-color: #22223b;
  --navbar-bg-color: #ffffffcc;
  --resume-link-color: #3a86ff;
  --contact-text-color: #22223b;
  --contact-input-color:#fffbf1;
  --contact-link-color:#3a86ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-color: var(--bg-color);
}

.dark-mode {
  --bg-color: #181825;
  --text-color: #f5f7fa;
  --link-color: #a3cef1;
  --link-hover-color: #ffbe0b;
  --card-bg-color: #232946;
  --card-text-color: #f5f7fa;
  --navbar-bg-color: #232946cc;
  --resume-link-color: #a3cef1;
  --contact-text-color: #f5f7fa;
  --contact-input-color:#ffff;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--link-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 2rem;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-notification.success {
  background: #28a745;
}

.toast-notification.error {
  background: #dc3545;
}

body:not(.dark-mode) .pp-dark {
  display: none !important;
}

body:not(.dark-mode) .pp-light {
  display: block !important;
  filter: drop-shadow(1px 1px 10px rgba(0, 0, 0, 0.41));
}

#navbar {
  background-color: transparent;
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: padding 0.5s, height 0.5s;
}

#navbar img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  transition: width 0.3s, height 0.3s;
}

#navlist {
  margin: 0;
}

#navlist li a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navlist li a:hover {
  color: var(--link-hover-color);
  transform: scale(1.1);
}

#themeToggleBtn, .mobile-menu-btn {
  color: var(--link-color);
  border-radius: 50%;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1001;
}

#themeToggleBtn:hover, .mobile-menu-btn:hover {
  background-color: var(--bg-color);
  color: var(--link-hover-color);
}

.mobile-menu-btn {
  display: none;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

#home {
  background-color: transparent;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

#home > div:not(#particles-js) {
  position: relative;
  z-index: 1;
}

.intro1 {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-color);
}

.name {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.role1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffbe0b;
}

.role2 {
  font-size: 1.5rem;
  font-weight: 600;
  position: relative;
}

.role2::after {
  content: '|';
  animation: blink 1s steps(2, start) infinite;
  margin-left: 1px;
}

@keyframes blink {
  to { visibility: hidden; }
}

.desc {
  font-size: 1.1rem;
  font-weight: 200;
  color: var(--text-color);
}

#home a {
  color: var(--link-color);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#home a:hover {
  color: var(--link-hover-color);
  transform: scale(1.2);
}

.pp-light {
  padding-top: 1rem;
  display: none !important;
  border-radius: 30%;
}

.pp-dark {
  padding-top: 1rem;
  display: block !important;
  border-radius: 30%;
  filter: drop-shadow(1px 1px 10px rgba(255, 255, 255, 0.301));
}

#experience {
  color: var(--text-color);
  background-color: transparent;
  opacity: 0;
  transform: translateY(20px);
}

#experience.visible {
  opacity: 1;
  transform: translateY(0);
  animation: fade-in 1s ease-in-out forwards;
}

#experience .exptitle {
  font-size: 2rem;
  font-weight: 600;
}

.exp {
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#experience .exp img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.rolename {
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  margin-top: 1rem;
}

.roledesc {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 200;
}

#skills {
  color: var(--text-color);
  background-color: transparent;
}

.skills-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.skill-item {
  padding: 1rem;
  transition: transform 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-10px);
}

.skill-item i {
  margin-bottom: 0.5rem;
  font-size: 3rem;
}

.skill-item p {
  font-weight: 500;
  color: var(--text-color);
}

#projects {
  background-color: transparent;
  color: var(--text-color);
}

#projects .protitle {
  font-weight: 600;
  font-size: 2rem;
}

#projects .card {
  color: var(--card-text-color);
  margin: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background-color: transparent;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.card:hover {
  transform: scale(1.03);
  cursor: pointer;
}

#projects .card a:hover {
  color: var(--link-hover-color);
  transition: color 0.3s ease-in-out;
}

#projects img {
  width: 100%;
  height: 30vh;
  object-fit: cover;
}

#projects .card-body {
  font-size: 1.2rem;
  font-weight: 600;
}

#projects .card-text {
  font-size: 0.9rem;
  font-weight: 300;
}

#projects .button {
  font-size: 1rem;
  padding: 0.375rem 0.75rem;
  line-height: 1.5;
  border-radius: 6px;
  text-decoration: none;
  background-color: transparent;
  border: none;
  color: var(--link-color);
}

.badge {
  font-size: 0.75rem;
  font-weight: 400;
}

#resume {
  background-color: transparent;
  margin: auto;
  padding: 3rem;
  color: var(--text-color);
  opacity: 0;
  transform: translateY(20px);
}

#resume.visible1 {
  opacity: 1;
  transform: translateY(0);
  animation: fade-in 1s ease-in-out forwards;
}

#resume .button1 {
  color: var(--resume-link-color);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  border: none;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

#resume .button1:hover {
  color: var(--link-hover-color);
  transform: scale(1.5);
}

.resumetitle {
  font-size: 2rem;
  font-weight: 600;
}

.resumeimg {
  width: 100%;
  height: auto;
}

#contact p, #contact label {
  color: var(--contact-text-color);
}

#contact input, #contact textarea {
  background-color: var(--contact-input-color);
}

#contact {
  background-color: transparent;
  padding: 2rem;
  text-align: start;
}

#contact p {
  font-size: 2rem;
  font-weight: 600;
}

#contact a {
  text-decoration: none;
  font-weight: 600;
  color: var(--contact-link-color);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#contact a:hover {
  transform: scale(1.1);
  color: var(--link-hover-color);
}

footer p {
  color: var(--text-color);
}

@keyframes appear-left {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes appear-right {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#home .appear-left {
  animation: appear-left 1s ease-in-out forwards;
}

#home .appear-right {
  animation: appear-right 1s ease-in-out forwards;
}

#projects .appear-left {
  opacity: 0;
  transform: translateX(-100px);
  animation: appear-left 1s ease-in-out forwards;
}

#projects .appear-right {
  opacity: 0;
  transform: translateX(100px);
  animation: appear-right 1s ease-in-out forwards;
}

#projects .animated {
  opacity: 1;
  transform: translateX(0);
}

#contact .appear-left {
  opacity: 0;
  transform: translateX(-80px);
  animation: appear-left 1s ease-in-out forwards;
}

#contact .appear-right {
  opacity: 0;
  transform: translateX(80px);
  animation: appear-right 1s ease-in-out forwards;
}

#contact .animated {
  opacity: 1;
  transform: translateX(0);
}

#navbar.navbar-small {
  padding: 0 1rem;
  height: 50% !important;
}

#navbar.navbar-small #navlist li a {
  font-size: 0.95rem;
}

#navbar.navbar-small img {
  width: 2rem;
  height: 2rem;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block !important;
  }

  #navlist {
    display: none !important;
    position: absolute;
    top: 70px;
    right: 20px;
    background: var(--navbar-bg-color);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem;
    flex-direction: column !important;
    gap: 1rem !important;
  }

  #navlist.show {
    display: flex !important;
  }

  #projects img {
    width: 100% !important;
    height: auto !important;
  }

  #experience {
    height: 100% !important;
    padding: 1rem !important;
  }

  .exp {
    width: 100% !important;
    height: 100% !important;
  }

  #experience .exp img {
    max-width: 240px;
    width: 100%;
  }

  .rolename {
    font-size: 1.2rem !important;
  }

  .roledesc {
    font-size: 1rem !important;
  }

  .intro1 {
    font-size: 1.2rem !important;
  }

  .name {
    font-size: 1.5rem !important;
  }

  .role1, .role2 {
    font-size: 1.2rem !important;
  }

  .desc {
    font-size: 0.9rem !important;
  }

  .pp-dark, .pp-light {
    width: 100% !important;
  }

  #projects .card {
    margin: 0.5rem !important;
    padding: 0.5rem !important;
  }

  #resume {
    margin-top: 3rem !important;
    padding: 1rem !important;
  }

  #resume a {
    font-size: 1rem !important;
  }

  #resume .resumetitle {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 480px) {
  #navbar .d-flex {
    padding: 0.5rem !important;
  }

  #navlist li a {
    font-size: 0.9rem !important;
  }
  .desc{
    display: none;
  }

  #experience .exp {
    max-width: 98vw;
    width: 100%;
    padding: 0.5rem 0.2rem;
  }

  #experience .exp img {
    max-width: 160px;
    width: 100%;
  }

  #experience .exptitle {
    font-size: 1.2rem !important;
  }

  .rolename {
    font-size: 0.95rem !important;
    padding-top: 1rem;
  }

  .roledesc {
    font-size: 0.8rem !important;
  }


  #projects .protitle {
    font-size: 1.2rem !important;
  }

  #projects .card-title {
    font-size: 0.8rem !important;
  }

  #projects .card-text {
    font-size: 0.7rem !important;
  }

  #projects .pro {
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #projects img {
    width: 100% !important;
    height: 25vh !important;
  }

  #projects .button {
    font-size: 0.95rem !important;
  }

  #resume {
    margin-top: 2rem !important;
    padding: 1rem !important;
  }

  #resume p {
    font-size: 0.8rem !important;
    margin-top: 24px !important;
    margin-bottom: 24px !important;
  }

  #resume a {
    font-size: 1rem !important;
  }

  #resume .resumetitle {
    font-size: 1.2rem !important;
  }

  #contact {
    padding: 1rem !important;
  }

  #contact p {
    font-size: 1.2rem !important;
  }

  #contact a {
    font-size: 0.8rem !important;
  }

  #contact .ic {
    gap: 2rem !important;
  }

  #contact .icon-section {
    margin-top: 2rem !important;
  }

  .skills-title {
    font-size: 1.2rem !important;
  }

  .skill-item {
    padding: 0.5rem !important;
  }

  .skill-item i {
    font-size: 2rem !important;
  }

  .skill-item p {
    font-size: 0.8rem !important;
  }
}
