:root {
    --primary-color: #6C63FF;
    --light-bg: #f5f5f5;
    --light-text: #333;
    --dark-bg: #1a1a2e;
    --dark-text: #f5f5f5;
}
body {
    margin:0;
    font-family:'Roboto',sans-serif;
    transition: background 0.5s, color 0.5s;
    scroll-behavior: smooth;
    background: var(--light-bg);
    color: var(--light-text);
    overflow-x: hidden;
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* *{
  box-sizing: border-box;
} */
body.dark {background: var(--dark-bg); color: var(--dark-text);}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    z-index: 999;
    transition: background 0.5s;
}
body.dark .navbar {background: rgba(30,30,50,0.9);}
.navbar .logo {font-weight: bold; color: var(--primary-color);}
.navbar ul {display:flex; gap:30px; list-style:none;}
.navbar ul li a {text-decoration:none; color:#333; font-weight: bold; font-size: 18px; transition:0.3s;}
body.dark .navbar ul li a {color:#f5f5f5;}
.navbar ul li a:hover {color: var(--primary-color);}
#themeToggleNav {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;          /* inherits color from navbar so it works in both light/dark */
    padding: 6px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

#themeToggleNav:hover {
    background: rgba(128, 128, 128, 0.15);   /* subtle hover background */
}

#themeToggleNav:active {
    transform: scale(0.9);    /* slight press effect on click */
}

#themeToggleNav i {
    transition: transform 0.4s ease;          /* smooth icon spin on toggle */
}

#themeToggleNav:active i {
    transform: rotate(30deg);                 /* rotates icon slightly when clicked */
}
.hamburger {display:none; font-size:1.8rem; cursor:pointer; user-select:none;}
@media (max-width:768px){
  .navbar{position: sticky; top: 0;}
    .navbar ul {display:none; flex-direction:column; position:absolute; top:60px; right:0; background: rgba(255,255,255,0.95); padding:20px; border-radius:10px;}
    body.dark .navbar ul {background: rgba(30,30,50,0.95);}
    .navbar.active ul {display:flex;}
    .hamburger {display:block;}
}

/* Hero Section with animated gradient */
header {
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    background: linear-gradient(270deg, #6C63FF, #3F3D56, #FF6584, #00C9FF);
    background-size: 800% 800%;
    animation: gradientMove 20s ease infinite;
    color:white;
    overflow:hidden;
}
/* Avatar floating animation */
@keyframes float {
    0% { transform: translateY(0px) rotateY(0deg) rotateX(0deg); }
    50% { transform: translateY(-15px) rotateY(0deg) rotateX(0deg); }
    100% { transform: translateY(0px) rotateY(0deg) rotateX(0deg); }
}

.avatar {
    animation: float 4s ease-in-out infinite;
}

@keyframes gradientMove {
    0% {background-position:0% 50%;}
    50% {background-position:100% 50%;}
    100% {background-position:0% 50%;}
}
.hero-container {
    display:flex;
    flex-wrap: wrap;
    align-items:center;
    justify-content: center;
    max-width:1200px;
    gap: 40px;
}
.hero-text {flex:1; min-width:300px;}
.hero-text h1 {
  font-size: 3rem;
  margin-bottom:0.5rem;
}

.hero-text h3 {
  font-size: 1.5rem;
  margin-bottom:0.5rem;
}

.hero-text h2 {font-size:1.5rem; margin-bottom:20px;}
@media (max-width: 768px) {
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text h2 {
    font-size: 1.2rem;
  }

  .hero-text h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .avatar {
    width: 40px;
    height: 40px;
  }

  
}


.avatar-container {flex:1; min-width:250px; perspective:1000px; display:flex; justify-content:center; opacity:0; transform:scale(0.8); transition:opacity 1s ease, transform 1s ease;}
.avatar-container.visible {opacity:1; transform:scale(1);}
.avatar {width:350px; height:350px; border-radius:50%; border:5px solid white; transition: transform 0.2s ease, box-shadow 0.2s ease;}
.btn {padding:10px 20px; background:#fff; color:#6C63FF; border:none; border-radius:5px; cursor:pointer; font-weight:bold; transition:0.3s;}
.btn:hover {transform:scale(1.1);}

/* Sections */
section {padding:80px 20px; max-width:1000px; margin:auto; opacity:0; transform: translateY(30px); transition: opacity 1s ease, transform 1s ease;}
section.visible {opacity:1; transform: translateY(0);}
h2.section-title {font-size:2rem; text-align:center; margin-bottom:40px;}

/* About Section Flex */
#about .about-container {display:flex; flex-wrap:wrap; flex-direction: row-reverse; align-items:center; gap:40px;}
#about .about-text {flex:1; min-width:300px; line-height: 30px; font-weight: 500;}

/* ================= SKILLS ================= */
/* ===== LINEAR SKILLS ===== */
.skill-bar {
  margin-bottom: 25px;
}

.bar {
  width: 100%;
  height: 22px;
  background: #ddd;
  border-radius: 12px;
  overflow: hidden;
}

body.dark .bar {
  background: #444;
}

.fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6C63FF, #00C9FF);
  border-radius: 12px;
  position: relative;
  transition: width 2s ease;
}

.percent-text {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-weight: bold;
  color: #fff;
}

/* ===== RADIAL SKILLS ===== */
.container1 {
  margin-top: 80px;
  text-align: center;
}

.radial-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 40px;
}

.radial-bar {
  position: relative;
  width: 160px;
  height: 160px;
}

.radial-bar svg {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
}

.progress-bar {
  fill: none;
  stroke: #ddd;
  stroke-width: 14;
}

body.dark .progress-bar {
  stroke: #444;
}

.path {
  fill: none;
  stroke: #6C63FF;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 502;
  stroke-dashoffset: 502;
  transition: stroke-dashoffset 2s ease;
}

.radial-bar .percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-size: 1.2rem;
  font-weight: bold;
}

.radial-bar .text {
  margin-top: 10px;
  font-weight: 500;
}

/* MOBILE FIX: 2 radial bars per row */
@media (max-width: 768px) {
  .radial-bars {
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
    gap: 40px;
  }

  .radial-bar {
    width: 130px;
    height: 130px;
    margin: auto;
  }

  .radial-bar svg {
    width: 130px;
    height: 130px;
  }

  .radial-bar .percentage {
    font-size: 1rem;
  }

  .radial-bar .text {
    font-size: 0.9rem;
  }
}



/* Projects */
.projects {display:flex;  gap:40px; justify-content:center;}
.project-card {background:#f0f0f0; border-radius:10px; overflow:hidden; padding:15px; width:300px; transition:0.3s; cursor:pointer; opacity:0; transform: translateY(30px);}
.project-card.visible {opacity:1; transform: translateY(0);}
body.dark .project-card {background:#2b2b3c;}
.project-card:hover {transform: scale(1.05) rotateX(5deg);}
.project-card img {width:100%; border-radius:10px; margin-bottom:10px;}
.project-card button {background: var(--primary-color); color:white; border:none; padding:10px 15px; border-radius:5px; cursor:pointer; transition:0.3s;}
.project-card button:hover {transform: scale(1.05);}
@media(max-width:768px){
  .contact-form {
    padding: 30px;
    width: 100%;
  }
}


@media (max-width: 768px) {
  .projects {
    flex-direction: column;
    align-items: center;
    gap: 30px; /* more space between cards */
    width: 100%;
  }

  .project-card {
    width: 100%;
    max-width: 95%;   /* almost full width but still clean */
    padding: 40px;    /* makes card feel bigger */
  }

  .project-card img {
    width: 100%;
    height: 160px;    /* increase image height */
    object-fit: cover;
  }

  .project-card h3 {
    font-size: 1.3rem;
  }

  .project-card p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .project-card button {
    padding: 12px 18px;
    font-size: 1rem;
  }
}


/* CONTACT FORM */
.contact-form {
  width: 100%;
  max-width: 920px;
  padding: 70px;
  border-radius: 30px;
  position: relative;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 3px solid transparent;                  /* transparent border */
  background-clip: padding-box;
  z-index: 0;
}

/* This pseudo-element creates the animated gradient border */
.contact-form::before {
  content: '';
  position: absolute;
  inset: -3px;                                    /* sits just outside the form */
  border-radius: 33px;                            /* slightly larger than form's 30px */
  background: linear-gradient(270deg, #6C63FF, #00C9FF, #FF6584);
  background-size: 300% 300%;
  animation: borderAnimate 6s linear infinite;
  z-index: -1;                                    /* sits behind the form */
}

body.dark .contact-form {
  background: #222;
  color: #fff;
}

@keyframes borderAnimate {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* INPUTS — same fix, use outline instead of border-image */
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 95%;
  padding: 14px 15px;
  margin-bottom: 18px;
  border-radius: 20px;
  border: 2px solid #6C63FF;                      /* simple solid border */
  transition: 0.4s;
  background: #fff;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: #00C9FF;
  box-shadow: 0 0 12px rgba(108,99,255,0.5);
}

body.dark .contact-form input,
body.dark .contact-form textarea,
body.dark .contact-form select {
  background: #222;
  color: #fff;
  border-color: #6C63FF;
  width: 100%;
}


/* BUTTON — keep as is, it already works */
.contact-form button {
  width: 100%;
  padding: 14px;
  border-radius: 30px;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(270deg, #6C63FF, #00C9FF, #FF6584);
  background-size: 400% 400%;
  animation: buttonGlow 6s ease infinite;
  transition: transform 0.3s;
}

.contact-form button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

@keyframes buttonGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* MOBILE */
@media (max-width: 768px) {
    #contact {
        padding: 40px 20px;    
    }

    .contact {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 0 auto;        
        padding: 0 20px;
        box-sizing: border-box;
    }

    .contact-form {
        width: 100%;
        max-width: 100%;
        padding: 30px 20px;
        box-sizing: border-box;
        margin: 0 auto;        
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        width: 100%;
        box-sizing: border-box;
    }
}






/* Social Icons */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    transition: 0.3s;
}

.social-icons a:hover {
    background: white;
    color: black;
    transform: scale(1.2);
}


/* ================= FOOTER ================= */
.footer {
  background: #111;
  color: #eee;
  padding: 50px 20px 20px;
  margin-top: 80px;
}

body.dark .footer {
  background: #0f0f1a;
}

.footer-content {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.footer-brand h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.footer-links h4,
.footer-social h4 {
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  color: #ccc;
  text-decoration: none;
  margin-bottom: 8px;
  transition: 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-icons {
  display: flex;
  gap: 15px;
}

.footer-icons a {
  width: 40px;
  height: 40px;
  border: 1px solid #555;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 1.4rem;
  transition: 0.3s;
}

.footer-icons a:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.15);
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 0.85rem;
  color: #aaa;
}

/* Responsive Fixes */
@media(max-width:768px){
    .hero-container {flex-direction:column;}
    #about .about-container {flex-direction:column;}
    .project-card {width:90%;}


}
/* Ensure three cards stay on one line on larger screens */
@media(min-width: 1024px){
    .project-card {
        flex: 0 0 30%; /* each card takes ~30% width */
    }
}

/* Responsive for smaller screens */
@media(max-width:1023px){
    .project-card {width:45%;} /* two per row */
}


/* Overlay with blur */
#popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

/* Show popup */
#popup-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Popup box */
#success-popup {
  background: #fff;
  padding: 30px 40px;
  border-radius: 16px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: scaleIn 0.4s ease;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Checkmark */
.checkmark {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #6C63FF, #00C9FF);
  color: #fff;
  border-radius: 50%;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

/* Text */
#success-popup h3 {
  margin-bottom: 8px;
  color: #333;
}

#success-popup p {
  color: #666;
  font-size: 15px;
}

/* Animation */
@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
