/* CSS Variables for Theme */
:root {
  /* Light Theme Colors */
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  /* Dark Theme Colors */
  --primary-color: #3b82f6;
  --secondary-color: #94a3b8;
  --accent-color: #fbbf24;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --border-color: #334155;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed header */
}

body {
  /* font-family: "Poppins", sans-serif; */
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: all 0.3s ease;
}

::selection {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-primary);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 70px;
  max-height: 70px;
  color: var(--primary-color);
  margin-left: 20px;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

/* Navigation Link States - CSS with Minimal JavaScript */
.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
}

/* Hover states */
.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after {
  width: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Focus states for accessibility */
.nav-link:focus {
  color: var(--primary-color);
  outline: none;
}

.nav-link:focus::after {
  width: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Active state for current section */
.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::after {
  width: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Remove all incorrect :target rules */
.nav-link[href="#home"]:target,
.nav-link[href="#about"]:target,
.nav-link[href="#services"]:target,
.nav-link[href="#skills"]:target,
.nav-link[href="#achievements"]:target,
.nav-link[href="#projects"]:target,
.nav-link[href="#contact"]:target {
  color: var(--text-secondary);
}

.nav-link[href="#home"]:target::after,
.nav-link[href="#about"]:target::after,
.nav-link[href="#services"]:target::after,
.nav-link[href="#skills"]:target::after,
.nav-link[href="#achievements"]:target,
.nav-link[href="#projects"]:target::after,
.nav-link[href="#contact"]:target::after {
  width: 0;
}

/* Remove the incorrect :target rules */
.nav-link[href="#home"]:target,
.nav-link[href="#about"]:target,
.nav-link[href="#services"]:target,
.nav-link[href="#skills"]:target,
.nav-link[href="#achievements"]:target,
.nav-link[href="#projects"]:target,
.nav-link[href="#contact"]:target {
  color: var(--text-color);
}

.nav-link[href="#home"]:target::after,
.nav-link[href="#about"]:target::after,
.nav-link[href="#services"]:target::after,
.nav-link[href="#skills"]:target::after,
.nav-link[href="#achievements"]:target,
.nav-link[href="#projects"]:target::after,
.nav-link[href="#contact"]:target::after {
  width: 0;
}

/* Remove default active state for home - let JavaScript handle it */
/* .nav-link[href="#home"] {
    color: var(--primary-color);
}

.nav-link[href="#home"]::after {
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
} */

.theme-toggle {
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
  color: white;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  margin-right: 15px;
}

.theme-toggle:hover {
  color: white;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

/* Home Section */
.home {
  margin-top: 40px;
  display: flex;
  align-items: center;
  padding-top: 80px;
  padding: 6rem 0;
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
}

.home-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.home-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.highlight {
  color: var(--primary-color);
  position: relative;
}

.highlight::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  animation: underline 4s ease-in-out infinite;
}

@keyframes underline {
  0%,
  100% {
    transform: scaleX(0);
  }
  50% {
    transform: scaleX(1);
  }
}

.home-text h2 {
  font-size: 2rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.home-text p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
}

.home-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  animation: subtle-tilt 0.5s ease forwards;
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: white;
  transform: translateY(-2px);
  animation: subtle-tilt 0.5s ease forwards;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.social-links a:hover {
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.home-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-container {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section Titles */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-primary);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* About Section */
.about {
  padding: 4rem 0 6rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  display: flex;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-items: center;
  text-align: justify;
}

.about-details {
  margin-top: 2rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.detail-item i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.detail-item a {
  text-decoration: none;
  color: var(--text-primary);
}

/* Services Section */
.services {
  padding: 4rem 0 6rem 0;
  background: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-primary);
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.service-card:hover {
  animation: tada-tilt 0.6s ease forwards;
  box-shadow: var(--shadow-lg);
}

@keyframes tada-tilt {
  0% {
    transform: rotateZ(0deg);
  }
  20% {
    transform: rotateZ(-6deg);
  }
  40% {
    transform: rotateZ(6deg);
  }
  60% {
    transform: rotateZ(-4deg);
  }
  80% {
    transform: rotateZ(4deg);
  }
  100% {
    transform: rotateZ(2deg);
  }
}

.service-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 2rem;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.service-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Skills Section */
.skills {
  padding: 4rem 0 6rem 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-item {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.skill-item:hover {
  animation: tada-tilt 0.6s ease forwards;
  box-shadow: var(--shadow-lg);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.skill-info h3 {
  color: var(--text-primary);
  font-weight: 600;
}

.skill-info span {
  color: var(--primary-color);
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 4px;
  transition: width 1.5s ease;
  animation: progressAnimation 2s ease-in-out;
}

@keyframes progressAnimation {
  0% {
    width: 0;
  }
}

/* Achievements Section */
.Achievements {
  padding: 4rem 0 6rem 0;
  background: var(--bg-secondary);
}

.Achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.Achievement-item {
  text-align: center;
  padding: 2rem;
  background: var(--bg-primary);
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.Achievement-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  animation: tada-tilt 0.6s ease forwards;
}

.Achievement-item h3 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.Achievement-item h3::after {
  content: "+";
  color: var(--primary-color);
}

.Achievement-item p {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Projects Section */
.projects {
  padding: 4rem 0 6rem 0;
  background: var(--bg-primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-secondary);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  animation: subtle-tilt 0.5s ease-in-out;
}

@keyframes subtle-tilt {
  0% {
    transform: rotateZ(0deg);
  }
  25% {
    transform: rotateZ(1.5deg);
  }
  50% {
    transform: rotateZ(-1.5deg);
  }
  75% {
    transform: rotateZ(1deg);
  }
  100% {
    transform: rotateZ(0deg);
  }
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* .project-card:hover .project-image img {
  transform: scale(1.1);
} */

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tech span {
  background: var(--bg-secondary);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.project-links-section {
  display: flex;
  justify-content: space-between;
}

.project-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.project-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.project-links a:hover {
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  color: white;
  transform: translateY(-2px);
}

.project-links-details {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

.project-links-details-live {
  font-weight: 600;
  background: #22c55e; /* green (live) */
  padding: 2px 15px;
  color: var(--text-primary);
  border-radius: 15px;
  text-align: center;
}

.project-links-details-private {
  font-weight: 600;
  background: #f87171; /* red (private) */
  padding: 2px 15px;
  color: var(--text-primary);
  border-radius: 15px;
  text-align: center;
}

.project-links-details-local {
  font-weight: 600;
  background: #60a5fa; /* blue (local) */
  padding: 2px 15px;
  color: var(--text-primary);
  border-radius: 15px;
  text-align: center;
}

.project-links-details-public {
  font-weight: 600;
  background: #fb923c; /* yellow (public) */
  padding: 2px 15px;
  color: var(--text-primary);
  border-radius: 15px;
  text-align: center;
}

/* Contact Section */
.contact {
  padding: 4rem 0 6rem 0;
  background: var(--bg-secondary);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.contact-details h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.contact-details p {
  color: var(--text-secondary);
}

.social-links-contact {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links-contact a {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.social-links-contact a:hover {
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  color: white;
  transform: translateY(-3px);
}

.contact-form {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* footer section */

.footer-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1.7rem 0;
}

.footer-content p {
  color: var(--text-secondary);
}

/* Scroll to Top */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  font-size: larger;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Animations */
.animate-text {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.animate-text:nth-child(1) {
  animation-delay: 0.2s;
}
.animate-text:nth-child(2) {
  animation-delay: 0.4s;
}
.animate-text:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: left 0.3s ease;
    border-top: 1px solid var(--border-color);
  }

  .nav.active {
    left: 0;
  }

  .nav ul {
    flex-direction: column;
    gap: 1rem;
    padding-left: 30px;
  }

  .home-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .home-text h1 {
    font-size: 2.5rem;
  }

  .home-text h2 {
    font-size: 1.5rem;
  }

  .social-links {
    justify-content: center;
  }

  .image-container {
    width: 300px;
    height: 300px;
  }

  .about-image {
    width: 300px;
    height: 300px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-text h3 {
    justify-content: center;
  }

  .about-text p {
    text-align: center;
  }


  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 200px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .home-text h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .image-container {
    width: 250px;
    height: 250px;
  }

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