@import url("https://fonts.googleapis.com/css2?family=Inter&display=swap");

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
}

/* Body loading mode: disable scroll */
body.loading {
  overflow: hidden;
  height: 100vh;
}

/* Loader overlay full screen */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: #1e1e2f;
  color: white;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

#progress-container {
  width: 80%;
  max-width: 400px;
  height: 20px;
  background: #333;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 20px;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: #4f46e5;
  transition: width 0.2s ease;
}

#progress-text {
  margin-top: 10px;
  font-family: sans-serif;
}

#content {
  display: none; /* Hidden until loaded */
  padding: 2rem;
}

#home {
  padding: 150px 0px 200px 0px;
}

#about {
  padding: 200px 0px 200px 0px;
}

#project {
  padding: 200px 0px 200px 0px;
}

#skills {
  padding: 200px 0px 200px 0px;
}

#achievement {
  padding: 200px 0px 200px 0px;
}

#certifications {
  padding: 200px 0px 200px 0px;
}

#education {
  padding: 200px 0px 200px 0px;
}

#blog {
  padding: 200px 0px 200px 0px;
}
/* Switch theme styles */

.switch-track {
  width: 56px;
  height: 32px;
  border-radius: 9999px;
  background-color: #d1d5db; /* gray-300 */
  padding: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
}

.switch-track.active {
  background-color: #03dac6;
}

.switch-ball {
  width: 24px;
  height: 24px;
  background-color: white;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
  transition: transform 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  user-select: none;
  position: relative;
}

.switch-ball.translate-x-6 {
  transform: translateX(24px);
}

/* Hamburger container */
.hamburger {
  position: relative;
  width: 32px;
  height: 24px;
  cursor: pointer;
  z-index: 50;
}

/* Hamburger lines */
.hamburger span {
  position: absolute;
  left: 0;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* Top line */
.hamburger span:nth-child(1) {
  top: 0;
}

/* Middle line */
.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

/* Bottom line */
.hamburger span:nth-child(3) {
  bottom: 0;
}

/* Open state: X shape */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 50%;
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: auto;
  top: 50%;
}

/* Typing effect */

.typing {
  white-space: nowrap;
  overflow: hidden;
  border-right: 4px solid #6366f1; /* indigo-500 */
  animation: typing 3s steps(30, end) infinite, blink 0.75s step-end infinite;
  max-width: 100%;
}

@keyframes typing {
  0% {
    width: 0;
  }
  50%,
  100% {
    width: 100%;
  }
}

@keyframes blink {
  0%,
  100% {
    border-color: transparent;
  }
  50% {
    border-color: #6366f1;
  }
}

.timeline-item {
  animation: fadeSlideUp 0.7s forwards;
  animation-delay: var(--delay);
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
