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

:root {
  --color: #667dff;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --accent: #00aeac;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow: rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
}

/* Loader screen */

.loader{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  flex-direction: column;
}

.loader-text{
  font-size: 2rem;
  font-weight: 600;
  margin-top: 2rem;
  opacity: 0;
}



.loader-bar{
  width: 300px;
  height: 4px;
  background-color: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.loader-progress{
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg,var(--color),var(--accent));
}

/* Cursor */

.cursor{
  position: fixed;
  width:  20px;
  height: 20px ;
  background-color: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.1s ease;
}

.cursor-follower{
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.2s ease;
}
nav {
  position: fixed;
  top: 0;
  width: 100vw;
  padding: 1.5rem 2rem;
  background-color: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(20px);
  z-index: 1000;
  transition: background-color 0.3s ease;
  transform: translateY(-100%);
}

[data-theme="light"] nav {
  background-color: rgba(255, 255, 255, 0.5);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size:1.7rem;
  font-weight: 900;
  color: var(--accent);
  font-family: 'Playfair Display', serif;
  
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  transition: transform 0.3s ease;

}

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a::after {
  content: ' ';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Theme Toggle */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  background-color: var(--bg-secondary);
  border-radius: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: 2px solid var(--border-color);
  margin-left: 1rem;

}

.theme-toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background-color: var(--accent);
  border-radius: 50%;
  transform: transform 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 255, 229, 0.7);
}

[data-theme="light"] .theme-toggle::before {
  transform: translate(28px);
  background-color: var(--color);
  box-shadow: 0 0 10px rgba(25, 117, 255, 0.7);
}

.theme-toggle-icon {
  position: absolute;
  top: 50%;
  font-size: 0.8rem;
  transform: translateY(-50%);
  transition: opacity 0.3s ease;
}

.theme-toggle-icon.sun {
  right: 6px;
  opacity: 0;
}

.theme-toggle-icon.moon {
  left: 5px;
  opacity: 1;
}

[data-theme="light"] .theme-toggle-icon.sun {
  opacity: 1;
}

[data-theme="light"] .theme-toggle-icon.moon {
  opacity: 0;
}

/* Mobile Menu */

.menu-toggle{
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span{
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  margin: 3px 0;
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1)
{
  transform: rotate(45deg) translate(6px,6px);
}
.menu-toggle.active span:nth-child(2)
{
  opacity: 0;
}
.menu-toggle.active span:nth-child(3)
{
  transform: rotate(-45deg) translate(6px,-6px);
}

.mobile-menu{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0%);
}

.mobile-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 2rem;
  font-weight: 600;
  margin: 1rem 0;
  font-family: 'Playfair Display', serif;
  transform: translateY(20px);
  transition: all 0.3s ease;
  opacity: 0;
}

.mobile-menu.active a{
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu a:nth-child(1)
{
  transition-delay:0.1s ;
  
}

.mobile-menu a:nth-child(2)
{
  transition-delay:0.2s ;

}

.mobile-menu a:nth-child(3)
{
  transition-delay:0.3s ;

}

.mobile-menu a:nth-child(4)
{
  transition-delay:0.4s ;

}

.mobile-menu a:nth-child(5)
{
  transition-delay:0.5s ;

}
.mobile-menu a:nth-child(6)
{
  transition-delay:0.6s ;

}

/* hero section */
.hero{
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg
{
  position: absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background-color: radial-gradient(circle at 50% 50% rgba(0,102,255,0.1) 0%, transparent 50%);
}

.hero-img{
  height: 60%;
  margin-left:5% ;
  margin-right: 5%;
}

.hero-content {
  text-align: center;
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title{
  font-size:  clamp(3rem, 8vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  filter: blur(10px);
  transform: translateY(5rem);
  opacity:0;
}

.hero-subtitle{
  font-size: clamp(1.2rem,3vw,2rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  filter: blur(10px);
  transform: translateY(5rem);
  opacity: 0;
}

.hero-description{
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  filter: blur((10px));
  transform: translateY(5rem);
  opacity: 0;
}

.cta-button{
  display:inline ;
  padding:1rem 2.5rem;
  background: linear-gradient(135deg,var(--color),var(--accent));
  color: var(--text-primary);
  text-decoration: none;
  border-radius:50px ;
  font-weight: 600;
  transition: transform 0.3s ease;
  filter: blur((10px));
  transform: translateY(5rem);
  opacity: 0;

}
.cta-button:hover{
  transform: translateY(-3px);
}

.hero-3d-model{
  position: absolute;
  width: 130%;
  z-index: -1;
}

@media (max-width:1080px){
  .hero-img {
    height: 38%;
  }
}

@media (max-width:768px){
  .nav-links{
    display: none;
  }

  .menu-toggle{
    display: flex;
  }

 .hero-content{
  padding:0 1rem;
 } 
 .nav-container{
  padding: 0 1rem;
 }
 .cursor, .cursor-follower{
  display: none;
 }
 .hero{
  display: flex;
  flex-direction: column-reverse;
 }
 .hero-img{
  height: 30%;
  margin:0;
 }
}

.contact-container{
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.contact-right{
  height:60%;
  margin-left:5% ;
  margin-right: 5%;
}

.contact-right img{
  height: 100%;
}

.contact-left{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

.contact-left-title h2{
  font-weight: 600;
  color: var(--accent) ;
  font-size: 2.5rem;
}

.contact-left-title hr{
  border:none;
  width:8.5rem ;
  height: 0.3rem;
  background-color: var(--accent);
}

.contact-form-wrapper {
  display: flex;
  width: 100%;
  justify-content: center;
}

.contact-inputs{
  width:20rem;
  height: 3rem;
  outline: none;
  padding: 0.5rem;
  font-weight: 500;
  border-radius: 0.9rem;
}

.contact-left textarea{
  height:10rem;
  padding-top: 1.5rem;
}

/* .contact-inputs:focus{
  border:1.5rem solid var(--bg-secondary);
} */

.contact-inputs::placeholder{
  color: #0a0a0a;
}

.contact-left button{
  display:flex ;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  font-size: 1rem;
  gap: 1rem;
  border: none;
  background:linear-gradient(45deg,var(--color),var(--accent) );
  border-radius:3rem ;
  width: 7rem;
}

button img{
  color: var(--text-primary);
}

@media (max-width:900px){
  .contact-container {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 100vh;
    padding-top: 5rem;
  }
  .contact-left {
    align-items: center; /* Center the form horizontally */
    margin-top: 2rem;
    width: 100%;
  }
  .contact-form-wrapper {
    width: 100%;
    justify-content: center;
    display: flex;
  }
  .contact-inputs{
    width: 80vw;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  .contact-right img {
    display: none;
  }
  .contact-right {
    display: none;
  }
}

@media (max-width:480px){
  .contact-container {
    padding-top: 6rem;
  }
  .contact-left {
    margin-top: 2.5rem;
    align-items: center; /* Center the form horizontally */
  }
  .contact-form-wrapper {
    width: 100%;
    justify-content: center;
    display: flex;
  }
  .contact-inputs {
    width: 95vw;
    max-width: 98vw;
    margin-left: auto;
    margin-right: auto;
  }
  .contact-right img {
    display: none;
  }
  .contact-right {
    display: none;
  }
}

/* Projects */

.projects-section {
    padding: 3.125rem 5%;
    margin-top: 4rem;
    text-align: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.projects-section h1 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
}

.flashcard-container {
    position: relative;
    width: 100%;
    height: 25rem; /* Increased container height to accommodate larger images */
    overflow: hidden;
    display: flex;
    align-items: center;
}

.flashcard-track {
    display: flex;
    position: absolute;
    width: 200%;
    animation: scroll 20s linear infinite;
}

.flashcard {
    flex: 0 0 auto;
    width: 15.625rem;
    height: 22.5rem; /* Increased height to fit larger image */
    margin: 0 0.9375rem;
    background-color: var(--bg-secondary);
    border-radius: 0.625rem;
    border: 0.0625rem solid var(--border-color);
    box-shadow: 0 0.25rem 0.5rem var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0.9375rem;
    cursor: pointer;
    position: relative;
}

.flashcard a {
    text-decoration: none;
    color: inherit;
    width: 100%;
    text-align: center;
}

.flashcard img {
    width: 100%;
    height: 12rem; /* Increased image height for bigger size */
    object-fit: cover;
    border-radius: 0.5rem;
    border: 0.0625rem solid var(--border-color);
    padding-top: 0.625rem;
    margin-top: 0.625rem;
}

.flashcard h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0.625rem 0;
}

.flashcard p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0 0.625rem;
    line-height: 1.4;
    flex-grow: 1;
}

.github-link {
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: none;
    padding: 0.625rem;
    border: 0.0625rem solid var(--accent);
    border-radius: 0.3125rem;
    margin: 0.625rem;
    transition: background-color 0.3s ease;
}

.github-link:hover {
    background-color: rgba(0, 174, 172, 0.1);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .projects-section {
    margin-top: 3.5rem;
  }

  .projects-section h1 {
    font-size: 2rem;
  }

  .flashcard-container {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    position: static;
    display: block;
  }

  .flashcard-track {
    display: block;
    position: static;
    width: 100%;
    animation: none;
  }

  .flashcard {
    width: 90%;
    max-width: 400px;
    height: auto;
    margin: 2rem auto; /* Increased gap between flashcards */
  }

  .flashcard img {
    height: 10rem;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    display: block !important; /* Ensure image is visible */
  }

  .flashcard h3 {
    font-size: 1rem;
  }

  .flashcard p {
    font-size: 0.8rem;
  }

  .github-link {
    font-size: 0.8rem;
    margin: 0.5rem;
  }

  /* Contact section image: reduce size, do not hide */
  .contact-right img {
    display: block !important;
    height: 120px;
    width: auto;
    max-width: 90vw;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .projects-section {
    margin-top: 3rem;
  }

  .projects-section h1 {
    font-size: 1.5rem;
  }

  .flashcard-container {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    position: static;
    display: block;
  }

  .flashcard-track {
    display: block;
    position: static;
    width: 100%;
    animation: none;
  }

  .flashcard {
    width: 98%;
    max-width: 350px;
    height: auto;
    margin: 1.5rem auto; /* Increased gap between flashcards */
  }

  .flashcard img {
    height: 8rem;
    padding-top: 0.375rem;
    margin-top: 0.375rem;
    display: block !important; /* Ensure image is visible */
  }

  .flashcard h3 {
    font-size: 0.9rem;
  }

  .flashcard p {
    font-size: 0.7rem;
    padding: 0 0.3125rem;
  }

  .github-link {
    font-size: 0.7rem;
    padding: 0.5rem;
    margin: 0.375rem;
  }

  /* Contact section image: reduce size, do not hide */
  .contact-right img {
    display: block !important;
    height: 80px;
    width: auto;
    max-width: 95vw;
    margin: 0 auto;
  }
}


/* About */
.about-section {
  padding: 3.125rem 5%;
  margin-top: 4rem;
  text-align: center;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--bg-primary);
}

.about-container h1 {
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
  color: var(--text-primary);
  font-family: 'Playfair Display', serif;
}

.about-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.about-text {
  flex: 1;
  text-align: left;
  max-width: 600px;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.about-text .cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--color), var(--accent));
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.about-text .cta-button:hover {
  transform: translateY(-3px);
}

.about-image {
  flex: 1;
  max-width: 400px;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 0.625rem;
  border: 0.0625rem solid var(--border-color);
  box-shadow: 0 0.25rem 0.5rem var(--shadow);
}

@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    text-align: center;
    max-width: 100%;
  }

  .about-image {
    max-width: 300px;
    margin-top: 2rem;
  }

  .about-container h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .about-section {
    padding: 2rem 3%;
  }

  .about-container h1 {
    font-size: 1.5rem;
  }

  .about-text p {
    font-size: 0.9rem;
  }

  .about-image {
    max-width: 250px;
  }
}


/* Footer */
footer {
            background-color: var(--bg-secondary);
            color: var(--text-primary);
            padding: 20px 0;
            border-top: 1px solid var(--border-color);
            transition: background-color 0.3s ease, border-top 0.3s ease;
        }

        .footer-container {
            max-width: 600px;
            margin: 0 auto;
            padding: 0 20px;
            text-align: center;
        }

        .social-links {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 15px;
        }

        .social-links a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background-color: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            font-size: 18px;
        }

        .social-links a:hover {
            transform: translateY(-3px);
            border-color: var(--accent);
            box-shadow: 0 5px 15px var(--shadow);
        }

        .social-links a.github:hover {
            color: var(--text-primary);
            background-color: #333;
            border-color: #333;
        }

        .social-links a.linkedin:hover {
            color: #ffffff;
            background-color: #0077b5;
            border-color: #0077b5;
        }

        .social-links a.kaggle:hover {
            color: #ffffff;
            background-color: #20beff;
            border-color: #20beff;
        }

        .social-links a.leetcode:hover {
            color: #000000;
            background-color: #ffa116;
            border-color: #ffa116;
        }

        .copyright {
            font-size: 14px;
            color: var(--text-secondary);
            border-top: 1px solid var(--border-color);
            padding-top: 15px;
            transition: color 0.3s ease, border-top 0.3s ease;
        }

        @media (max-width: 480px) {
            .social-links {
                gap: 15px;
            }
            
            .social-links a {
                width: 35px;
                height: 35px;
                font-size: 16px;
            }

            .main-content h1 {
                font-size: 2rem;
            }
        }
