:root {
  --bg-color: #0d0d0d;
  --text-main: #efe7d1;
  --text-muted: #ffffffb8;
  --heading-color: rgb(218, 240, 201);
  --card-bg: rgba(51, 51, 51, 0.234);
  --card-border-green: rgba(0, 255, 204, 0.7);
  --card-border-orange: rgba(255, 153, 0, 0.7);
  --card-border-purple: rgba(168, 85, 232, 0.7);
  --card-border-yellow: rgba(211, 237, 116, 0.7);
  --menu-btn-text: rgba(255, 255, 255, 0.7);
  --menu-btn-border: rgba(237, 207, 116, 0.368);
  --menu-btn-hover-shadow: rgba(229, 237, 116, 0.7);
  --menu-btn-hover-border: rgba(238, 255, 0, 0.7);
  --loader-bg: black;
  --loader-hex-path: #333;
  --loader-hex-fill: rgb(255, 244, 119);
  --title-text-shadow: rgb(80, 55, 42);
  --menu-btn-idle: rgba(255, 255, 255, 0.67);
  --menu-btn-active: rgb(255, 244, 119);
}

body.light-theme {
  --bg-color: #ffffff;
  --text-main: #333333;
  --text-muted: #555555;
  --heading-color: #222222;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border-green: rgba(0, 150, 120, 0.8);
  --card-border-orange: rgba(200, 100, 0, 0.8);
  --card-border-purple: rgba(120, 50, 180, 0.8);
  --card-border-yellow: rgba(150, 170, 50, 0.8);
  --menu-btn-text: #444444;
  --menu-btn-border: rgba(180, 150, 50, 0.5);
  --menu-btn-hover-shadow: rgba(170, 132, 50, 0.4);
  --menu-btn-hover-border: rgba(204, 150, 50, 0.9);
  --loader-bg: white;
  --loader-hex-path: #ccc;
  --loader-hex-fill: #555;
  --title-text-shadow: rgb(240, 223, 180);
  --menu-btn-idle: rgba(0, 0, 0, 0.6); 
  --menu-btn-active: rgb(233, 171, 2); 
}

.unselectable {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

body, html {
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  font-family: Arial, sans-serif;
  transition: background-color 0.5s ease, color 0.5s ease;
}


/* Loader styles */

.loader-container {
  width: 100%;
  height: 100%;
  background-color: var(--loader-bg);
  display: flex;
  justify-content: center;
  align-items: center;
}

.progress-hex {
  width: 100px;
  height: 100px;
}

.progress-hex-path {
  stroke: var(--loader-hex-path);
  stroke-width: 5;
}



.progress-text {
  font-family: 'Times New Roman', Times, serif, sans-serif;
  font-size: 46px; 
  fill: var(--heading-color);
  text-anchor: middle;
  dominant-baseline: middle;
}

.progress-hex-fill {
  stroke:  var(--loader-hex-fill); 
  stroke-width: 5; 
  stroke-dasharray: 339; 
  stroke-dashoffset: 339; 
  animation: fill 1.5s linear forwards;
}

@keyframes fill {
  from {
    stroke-dashoffset: 339; 
  }
  to {
    stroke-dashoffset: 0; 
  }
}


/* ----------------------------- */


#orbit-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
}

/* canvas {
  display: block;
  width: 100%;
  height: 100%;
  background-color: #0d0d0d; 
} */

#title-L {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.5em;
  color: var(--heading-color);
  text-decoration: none;
}

#menu-container {
  display: flex;
  justify-content: center; 
  padding-top: 0.3em; 
}

#menu {
  background-color: none;
  padding: 0.625em 1.25em;
  margin-top: 1.25em;
  border-radius: 1.25em;    
  display: inline-block;
  position: relative; 
  animation: slideInMenu 1s forwards; 
}

#menu button {
  background-color: transparent;
  border: 1px solid var(--menu-btn-border);
  color: var(--menu-btn-text);
  padding: 0.625em 1.25em; 
  margin: 0 1em; 
  cursor: pointer;
  font-size: 1em;
  border-radius: 0.625em;
  transition: all 0.3s ease;
}

#menu button:hover {
  box-shadow: 0 0 0.5em var(--menu-btn-hover-shadow); 
  border: 1px solid var(--menu-btn-hover-border); 
}

#content-container {
  margin-top: 2em;
  position: relative;
  width: 100%;
  height: 100vh;
  overflow-y: scroll; /* Keeps scroll functionality */
  scrollbar-width: none; /* Hides scrollbar in Firefox */
  -ms-overflow-style: none; /* Hides scrollbar in IE/Edge */
  padding-bottom:  10em; /* Adds space after content */
}

#content-container::-webkit-scrollbar {
  display: none; /* Hides scrollbar in Chrome, Safari, and Edge */
}

#content-container > :last-child {
  margin-bottom: 12em; /* Adds space below the last element */
}

#content-wrapper {
  display: none;
  max-width: 45%; 
  margin: 4em auto 0;
  background-color: var(--card-bg); 
  padding: 2em;
  box-shadow: 0 0 0.5em var(--card-border-orange); 
  border: 1px solid var(--card-border-orange);
  border-radius: 1em;
  color: var(--text-muted);  
  animation: twistIn 1s forwards, fadeIn 3s forwards; 
}

#content-wrapper p{
  color: var(--text-main); 
}

@keyframes rollout {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes twistIn {
  from {
    transform: rotateY(90deg);
  }
  to {
    transform: rotateY(0deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 2;
  }
}

@keyframes unfold {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }
  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes slideInFromTop {
  0% {
    top: -100%;
  }
  100% {
    top: 4em;
  }
}

@keyframes swingingCard {
  0% {
    transform: rotate(0deg);
  }
  30% {
    transform: rotate(-15deg);
  }
  50% {
    transform: rotate(10deg);
  }
  70% {
    transform: rotate(-7deg);
  }
  100% {
    transform: rotate(5deg);
  }
}

@keyframes stopSwinging {
  0% {
    transform: rotate(5deg);
  }
  50% {
    transform: rotate(-3deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

#contact-div-wrapper {
  width: 20%; 
  background-color: var(--card-bg);  
  box-shadow: 0 0 0.5em var(--card-border-yellow); 
  border: 1px solid var(--card-border-yellow); 
  padding: 2em;
  border-radius: 1em;
  position: absolute;
  top: 4em;
  margin-left: 35%;
}

.slide-in {
  animation: slideInFromTop 0.7s forwards;
}

.swinging-animation {
  animation: swingingCard 2s infinite alternate ease-in-out;
}

.stop-swinging-animation {
  animation: stopSwinging 2s forwards; 
}
#contact-div-wrapper h3{
  text-align: center;
  padding-bottom: 1em;
}

#contact-div-wrapper .contact, .contact a {
  font-size: medium;
  padding-left: 0.5em;
  color: var(--text-muted); 
  background-color: var(--card-bg); 
  border-radius: 1em;
  text-decoration: none;
}
.contact a:hover {
  color: var(--loader-hex-fill);
}

.projects-div-wrapper {
  background: none;
  /* padding: 2em; */
  margin-top: -3.5em;
  margin-bottom: 5em;
  border-radius: 1em;
  position: relative; 
  left: 50%;
  bottom: -100%;
  transform: translateX(-45%);
  width: 60%;
  display: flex;
}

.top-line {
  text-align: center;
  margin: 2em 25%;
  background-color: var(--card-bg);  
  box-shadow: 0 0 0.5em var(--card-border-purple); 
  border: 1px solid var(--card-border-purple); 
  width:  calc(45%);
  padding: 0.1em 1.25em ; 
  margin-right: 1em;
  margin-bottom: 1em;
  border-radius: 0.625em; 
}
.top-line span{
  font-size: 1.2em;
  font-weight: bold;
  color: var(--heading-color);
}
.top-line p,
.p_desc {
  color: var(--text-main); 
}

.usedT {
  color: rgb(243, 131, 75);
}
.used-prefix {
  color: rgba(141, 220, 189, 0.889);
}
.project-title1 {
  color: var(--heading-color);
}

.project-title1:hover {
  color:  var(--loader-hex-fill);
  text-shadow: 2px 2px  var( --title-text-shadow);
  cursor: pointer;
}


.project-div {
  background-color: var(--card-bg);  
  box-shadow: 0 0 0.5em var(--card-border-purple); 
  border: 1px solid var(--card-border-purple); 
  width: calc(23%);
  height: 12em;
  padding: 1.25em; 
  margin-right: 1.5em;
  margin-bottom: 1em;
  border-radius: 0.625em; 
  color: var(--text-main);
}

.infoTag {
  color: rgb(166, 159, 255);
  text-decoration: none;
}

.githubTag {
  color: rgb(172, 117, 255);
  text-decoration: none;
}
.previewTag {
  color: red;
  text-decoration: none; /* Remove underline */
}
.previewTag:hover, .githubTag:hover {
  text-decoration: underline; /* Add underline on hover */
}

.slide-up {
  animation: slideUpFromBottom 1s forwards;
}

@keyframes slideUpFromBottom {
  0% {
    top: 100%; 
  }
  100% {
    top: 8%; 
  }
}


#welcome {
  background-color: var(--card-bg);
  box-shadow: 0 0 0.5em var(--card-border-green); 
  border: 1px solid var(--card-border-green);
  color: var(--text-muted); 
  padding: 1.25em;
  margin: 4em auto 0;
  border-radius: 0.6em;
  width: 15%;
  position: absolute;
  animation: slideInWelcome 1s forwards; 
}

#paragraph-container {
  background-color: var(--card-bg);  
  box-shadow: 0 0 0.5em var(--card-border-green); 
  border: 1px solid var(--card-border-green); 
  padding: 1.25em;
  margin: 4em auto 0;
  border-radius: 0.6em;
  width: 28%;
  position: absolute;
  animation: slideInParagraph 1s forwards;
  white-space: normal;
}

p.typing-animation {
  color: var(--card-border-green); 
  line-height: 2;
}

h3 {
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 7px;
  color: var(--heading-color);
}

p {
  font-size: 14px;
  color: var(--text-main); 
}

span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Theme Toggle Button */
#theme-toggle-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--card-bg);
  border: 1px solid var(--menu-btn-border);
  color: var(--menu-btn-text);
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 0.5em rgba(0,0,0,0.1);
}

#theme-toggle-btn:hover {
  box-shadow: 0 0 0.5em var(--menu-btn-hover-shadow);
  border-color: var(--menu-btn-hover-border);
  transform: scale(1.1);
}

#theme-toggle-btn i {
  font-size: 1.2rem;
}

body.light-theme #theme-toggle-btn i.fa-sun {
  display: none;
}

body:not(.light-theme) #theme-toggle-btn i.fa-moon {
  display: none;
}




@keyframes slideInWelcome {
  0% {
    left: -100%; 
  }
  60% {
    left: calc(22%); 
  }
  70% {
    left: calc(19%); 
  }
  80% {
    left: calc(22%); 
  }
  90% {
    left: calc(20%); 
  }
  100% {
    left: calc(22%); 
  }
}

@keyframes slideInParagraph {
  0% {
    right: -100%; 
  }
  60% {
    right: calc(28%); 
  }
  70% {
    right: calc(26%); 
  }
  80% {
    right: calc(28%); 
  }
  90% {
    right: calc(27%); 
  }
  100% {
    right: calc(28%); 
  }
}

@media screen and (max-width: 1024px) {
  #welcome {
    left: 5%; 
    width: 13%; 
  }
  .project-div {
    height: calc(15%);
  }  
  #paragraph-container {
    right: 5%; 
    width: 26%; 
  }
}

@media screen and (max-width: 768px) {
  #welcome {
    left: 5%; 
    width: 11%; 
  }
  .project-div {
    height: calc(25%);
  } 
  #paragraph-container {
    right: 5%; 
    width: 22%; 
  }
}

@media only screen and (max-width: 480px) {
  #menu{
    background-color: rgba(57, 53, 53, 0.863); 
    padding: 0.625em 0.55em;
    margin-top: 0.25em;
  }
  #welcome {
    left: 5%; 
    width: 8%; 
  }  
  #paragraph-container {
    right: 5%; 
    width: 20%; 
  }
  #menu button {
    font-size: 0.7em;
  }
  h2 {
    font-size: 14px;
  }
  h3 {
    font-size: 12px;
  }   
  p {
    font-size: 10px;
  }  
  span {
    font-size: 8px;
  } 
}

@keyframes slideInMenu {
  0% {
    top: -100%; 
  }
  40% {
    top: 25px; 
  }
  55% {
    top: 15px; 
  }
  70% {
    top: 25px; 
  }
  85% {
    top: 18px; 
  }
  100% {
    top: 25px; 
  }
}
