* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, "Audiowide" , sans-serif;
}

/* Background */
#background {
  position: fixed;
  inset: 0;
  z-index: -1;
  transition: background 2s ease-in-out;
  opacity: 0.1;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid #ccc;
  z-index: 10;
}
nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}
.nav-left{
  position: relative;
  text-decoration: none;  
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  color: #4f46e5;
  opacity: 0;
  animation: slideRight 1s ease forwards;
  animation-delay: 0.3s;
}

nav .nav-right button {
  text-decoration: none;   
  margin-left: 1rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: #555;
  transition: color 0.3s;
  animation: slideTop .5s ease forwards;
}
nav .nav-right button:hover {
  color: #4f46e5;
}


/* dark mode and light mode */
.toggle-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.toggle-btn:hover {
  transform: scale(1.2);
}

#theme-toggle {
  cursor: pointer;
}

/* Dark mode styles for body */
body.dark-mode {
  background-color: #121212;
  color: black;
}

body.dark-mode nav {
  background: rgba(30,30,30,0.9);
  border-bottom: 1px solid #444;
}

body.dark-mode .nav-right button{
  color: white;
}

body.dark-mode .nav-right button:hover{
  color: #4f46e5;
}

body.dark-mode .nav-right.show{
  background: black;
}

body.dark-mode .hamburger {
  color: white;
}

body.dark-mode h3{
  color: white;
}

body.dark-mode .about-text p{
  color: white;
}

body.dark-mode .container h2{
  color: white;
}

body.dark-mode .skills-grid{
  color: white;
}

body.dark-mode .container text-center h2{
  color: white;
}

body.dark-mode .work_from-p{
  color: white;
}

body.dark-mode .projects_frame{
  color: black;
}

/* Sections */
.section {
  min-height: 100vh;
  padding: 6rem 2rem 4rem 2rem;
  margin-top: 200px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 120px; 
}


.hero h3{
  font-size: 32px;
  animation: slideBottom 1s ease forwards;
}

/* Hero */
.hero h1  {
  color: #4f46e5;
  font-size: 56px;
  font-weight: 600;
  animation: slideRight 1s ease forwards;
}

.typed-text {
  font-size: 32px;
}
.avatar img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin-bottom: 1rem;
}



.hero .buttons button {
  margin: 0 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
}
.hero .buttons button:first-child {
  background-color: #4f46e5;
  color: #fff;
  animation: slideRight 1s ease forwards;
}
.hero .buttons button:last-child {
  background-color: transparent;
  border: 2px solid #4f46e5;
  color: #4f46e5;
  opacity: 0;
  animation: slideLeft 1s ease forwards;
}

.hero .buttons button:last-child:hover {
  background: #5b7cad;
  color: rgb(255, 255, 255);
}

.home-icon {
    margin-top: 20px;
    margin-left: 50px;
}
.home-icon a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid rgb(111, 78, 212);
    border-radius: 50%;
    color: rgb(111, 78, 212);
    text-decoration: none;
    margin: 5px 5px 5px 5px;
    transition: .5s ease;
    opacity: 0;
    animation: slideBottom 1s ease forwards;
    animation-delay: calc(.2s * var(--i));
}

.home-icon a:hover {
    background: rgb(111, 78, 212);
    color: black;
    box-shadow: rgb(91, 77, 248);
}

/* About */
.about-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.about-img img {
  width: 50%;
  border-radius: 0.5rem;
}
.about-text p {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}
.specialties span {
  display: inline-block;
  background: rgba(79,70,229,0.1);
  color: #4f46e5;
  padding: 0.25rem 0.75rem;
  margin: 0.25rem;
  border-radius: 9999px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.skill {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.skill-name {
  display: flex;
  justify-content: space-between;
}
.skill-bar {
  height: 0.5rem;
  background: #ccc;
  border-radius: 999px;
  overflow: hidden;
}

.skill-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skill-bar-fill {
  height: 100%;
  background: #4f46e5;
  width: 0;
  transition: width 1s ease-out;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 1rem;
}
.project {
  background: #fff;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.project img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 0.5rem;
}
.project .tech span {
  display: inline-block;
  margin: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(79,70,229,0.1);
  color: #4f46e5;
  border-radius: 0.25rem;
}

/* Contact */
.contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}
.contact form input,
.contact form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  width: 100%;
}
.contact form button {
  padding: 0.75rem;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

/* Footer */
footer {
  color: black;
  padding: 1.60rem;
  text-align: center;
  border-radius: 5px;
  background-color: #555;
}


/* Hamburger Icon */
.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}

/* Mobile Menu */
@media screen and (max-width: 768px) {
  nav .nav-right {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px; /* adjust based on nav height */
    right: 2rem;
    background: rgba(255,255,255,0.95);
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    padding: 1rem;
    z-index: 20;
  }

  nav .nav-right.show {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  /* Optional: style buttons in mobile menu */
  nav .nav-right button {
    margin: 0.5rem 0;
  }
}


@keyframes slideRight {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0px);
        opacity: 1;
    }
}


@keyframes slideLeft {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0px);
        opacity: 1;
    }
}

@keyframes slideTop {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0px);
        opacity: 1;
    }
}

@keyframes slideBottom {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0px);
        opacity: 1;
    }
}


@media (max-width: 768px) {
  .about-container {
    flex-direction: column; /* row se column ho jaye */
    align-items: center;
    text-align: center;
  }

  .about-text {
    font-size: 1.2rem;
  }
}
