/* ============================================
   ROOT VARIABLES & THEME CONFIGURATION
   ============================================ */
:root {
  --primary-color: #6366f1;
  --secondary-color: #f59e0b;
  --accent-color: #ec4899;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
  --primary-color: #818cf8;
  --secondary-color: #fbbf24;
  --accent-color: #f472b6;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-card: #1f2937;
  --border-color: #374151;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  width: 100%;
}

body {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  transition: background-color 0.3s ease, color 0.3s ease;
}

main {
  flex: 1;
  width: 100%;
  overflow-x: hidden;
}

/* Prevent horizontal scroll from animations */
.container,
.container-fluid {
  max-width: 100%;
  overflow-x: hidden;
}

/* ============================================
   DARK MODE TOGGLE BUTTON
   ============================================ */
.theme-toggle {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 9999;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: var(--shadow-lg);
}

.theme-toggle i {
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

/* ============================================
   NAVBAR STYLING
   ============================================ */
.navbar {
  background-color: var(--bg-primary) !important;
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  color: var(--primary-color) !important;
  font-weight: 700;
  font-size: 1.8rem;
  transition: all 0.3s ease;
}

.nav-menu {
  border: none;
  background-color: transparent;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.navbar-nav a {
  color: var(--text-primary) !important;
  position: relative;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.navbar-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s ease;
}

.navbar-nav a:hover {
  color: var(--primary-color) !important;
}

.navbar-nav a:hover::after {
  width: 100%;
  left: 0;
}

/* Contact Button Styling */
.c-btn {
  border: none;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff !important;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.c-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.h-btn:hover {
  background: var(--primary-color);
  color: #fff !important;
  transform: translateY(-5px);
  transition-duration: 0.4s;
}

/* ============================================
   HOME SECTION STYLING
   ============================================ */
.home {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 80px 0;
  min-height: 90vh;
  display: flex;
  align-items: center;
  width: 100%;
}

.home .row {
  align-items: center !important;
  width: 100%;
  margin: 0 auto;
}

.home h2 {
  font-size: 3rem;
  line-height: 4rem;
  color: var(--text-primary);
  animation: fadeInUp 1s ease-out;
  transition: all 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.c-orange {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 4rem;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { 
    filter: hue-rotate(0deg); 
  }
  50% { 
    filter: hue-rotate(20deg); 
  }
}

.home p {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  animation: fadeInUp 1s ease-out 0.3s both;
  max-width: 100%;
}

.profile-img {
  max-width: 500px;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
  0%, 100% { 
    transform: translateY(0px); 
  }
  50% { 
    transform: translateY(-3px); 
  }
}

/* ============================================
   LINK STYLING
   ============================================ */
.link {
  text-decoration: none;
  font-size: 1.2rem;
  color: var(--primary-color);
  position: relative;
  font-weight: 600;
  transition: all 0.3s ease;
}

.link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary-color);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.link:hover {
  color: var(--accent-color);
}

.link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* ============================================
   EXPERTISE SECTION
   ============================================ */
.expertise {
  padding: 80px 0;
  background-color: var(--bg-primary);
  width: 100%;
}

/* Navbar Contact Button - Move it left */
.navbar .c-btn {
  margin-right: 70px;
}

.heading {
  margin-bottom: 3rem;
}

.heading small {
  color: var(--primary-color);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.heading h3 {
  margin-top: 0.5rem;
  color: var(--text-primary);
  font-size: 2.5rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.heading p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.service-card {
  text-align: center;
  padding: 2.5rem;
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  transition: all 0.4s ease;
  border: 1px solid var(--border-color);
  height: 100%;
  min-height: 300px;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.service-icon {
  width: 100px;
  height: auto;
  transition: all 0.4s ease;
  margin-bottom: 1rem;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-card h4 {
  color: var(--text-primary);
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* ============================================
   SKILL SECTION
   ============================================ */
.skill {
  background-color: var(--bg-secondary);
  padding: 80px 0;
  width: 100%;
}

.progress-card {
  padding: 2rem;
  background-color: var(--bg-card);
  text-align: center;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: all 0.4s ease;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.progress-card:hover {
  transform: translateY(-10px) rotate(2deg);
  box-shadow: var(--shadow-lg);
}

.circular-progress {
  position: relative;
  height: 150px;
  width: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--primary-color) 3.6deg, #ededed 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: all 0.3s ease;
}

.circular-progress::before {
  content: "";
  position: absolute;
  height: 130px;
  width: 130px;
  border-radius: 50%;
  background-color: var(--bg-card);
}

.progress-value {
  position: relative;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.html-progress {
  color: var(--secondary-color);
}

.javascript-progress {
  color: var(--primary-color);
}

.php-progress {
  color: #20c997;
}

.reactjs-progress {
  color: var(--accent-color);
}

.text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio {
  padding: 80px 0;
  background-color: var(--bg-primary);
  width: 100%;
}

#myBtnContainer {
  margin-bottom: 45px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 0 1rem;
}

.filter-item {
  border: 2px solid transparent;
  color: var(--text-primary);
  background: transparent;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.6rem 1.8rem;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.filter-item:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.filter-item:focus {
  outline: none;
}

.filter-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-color: transparent;
}

.portfolio-body {
  padding: 0 1rem;
}

.post {
  margin-bottom: 2rem;
}

.post .card {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: all 0.4s ease;
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
}

.post .card:hover {
  transform: translateY(-15px) rotate(1deg);
  box-shadow: var(--shadow-lg);
}

.post .card-img-top {
  width: 100%;
  height: 250px;
  object-fit: contain;
  padding: 1rem;
  transition: all 0.3s ease;
}

.post .card-body {
  padding: 1.5rem;
}

.post .card-title {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.post .badge {
  background: var(--primary-color) !important;
  margin: 0.3rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

/* ============================================
   TESTIMONIAL SECTION
   ============================================ */
.testimonial {
  padding: 80px 0;
  background-color: var(--bg-secondary);
  width: 100%;
}

.testimonial img {
  max-width: 100%;
  height: auto;
  transition: all 0.5s ease;
}

.testimonial img:hover {
  transform: scale(1.1);
}

.testimonial h4 {
  color: var(--text-primary);
  font-weight: 700;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.testimonial i {
  font-size: 2.9rem;
  color: var(--primary-color);
}

.testimonial p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

.nextprev-btn {
  border: none;
  background-color: transparent;
  color: var(--primary-color);
  font-size: 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.prev-btn:hover {
  color: var(--accent-color);
  transform: translateX(-10px) scale(1.2);
}

.next-btn:hover {
  color: var(--accent-color);
  transform: translateX(10px) scale(1.2);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
  background-color: var(--bg-primary);
  padding: 80px 0;
  width: 100%;
}

.contact-details {
  margin-bottom: 2rem;
}

.contact-details i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-details p {
  font-size: 1.2rem;
  margin: 0;
  color: var(--text-secondary);
}

.contact-form .form-control {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.contact-form .form-control::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.contact-form .form-control:focus {
  box-shadow: none;
  border: 2px solid var(--primary-color);
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
}

/* ============================================
   FOOTER SECTION
   ============================================ */
footer {
  background-color: var(--bg-secondary);
  padding: 4rem 0 2rem;
  width: 100%;
}

footer h3 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

footer .link-group {
  margin: 2rem 0;
}

footer .link-group a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: color 0.3s ease;
  padding: 0 0.5rem;
}

footer .link-group a:hover {
  color: var(--primary-color);
}

footer .link-group span {
  color: var(--text-secondary);
}

.social-links {
  margin: 2rem 0;
}

.social-links button {
  border: 2px solid var(--border-color);
  margin: 0.5rem;
  font-size: 1.2rem;
  background-color: var(--bg-card);
  color: var(--text-primary);
  padding: 14px 16px;
  transition: all 0.3s ease;
  border-radius: 50%;
  cursor: pointer;
}

.social-links button:hover {
  transform: translateY(-5px) rotate(10deg);
}

.social-links .github:hover {
  background-color: #333;
  color: #fff;
  border-color: #333;
}

.social-links .whatsapp:hover {
  background-color: #25D366;
  color: #fff;
  border-color: #25D366;
}

.social-links .behance:hover {
  background-color: #0077B5;
  color: #fff;
  border-color: #0077B5;
}

footer p {
  color: var(--text-secondary);
  margin-top: 1rem;
}

footer hr {
  border-color: var(--border-color);
  opacity: 0.3;
  margin: 2rem 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .theme-toggle {
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
  }

  .theme-toggle i {
    font-size: 1.2rem;
  }

  .home {
    padding: 60px 0;
    min-height: auto;
  }

  .home h2 {
    font-size: 2rem;
    line-height: 2.5rem;
  }

  .c-orange {
    font-size: 2.5rem;
  }

  .home p {
    font-size: 1rem;
  }

  .profile-img {
    max-width: 350px;
    margin: 30px auto 0;
  }

  .expertise,
  .skill,
  .portfolio,
  .testimonial,
  .contact {
    padding: 60px 0;
  }

  .heading h3 {
    font-size: 2rem;
  }

  .heading small {
    font-size: 1.1rem;
  }

  .service-card {
    padding: 2rem;
    margin-bottom: 1.5rem;
    min-height: auto;
  }

  .service-icon {
    width: 80px;
  }

  .progress-card {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
  }

  #myBtnContainer {
    gap: 0.5rem;
  }

  .filter-item {
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
  }

  .circular-progress {
    height: 130px;
    width: 130px;
  }

  .circular-progress::before {
    height: 112px;
    width: 112px;
  }

  .progress-value {
    font-size: 1.5rem;
  }

  .text {
    font-size: 1rem;
  }

  .post .card-img-top {
    height: 200px;
  }
}

@media (max-width: 576px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .navbar-brand {
    font-size: 1.5rem;
  }

  .c-btn {
    font-size: 1rem;
    padding: 0.6rem 1.2rem !important;
  }

  .heading h3 {
    font-size: 1.8rem;
  }

  .heading small {
    font-size: 1rem;
  }

  .service-card h4 {
    font-size: 1.3rem;
  }

  .social-links button {
    margin: 0.3rem;
    padding: 12px 14px;
    font-size: 1rem;
  }

  .contact-details p {
    font-size: 1rem;
  }

  footer .link-group a {
    font-size: 1rem;
    padding: 0 0.3rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .home {
    padding: 70px 0;
  }

  .profile-img {
    max-width: 450px;
  }

  .circular-progress {
    height: 140px;
    width: 140px;
  }

  .circular-progress::before {
    height: 122px;
    width: 122px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}