/* Base Styles */
:root {
  --primary-color: #4a6cf7;
  --secondary-color: #6c757d;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --body-color: #f5f8ff;
  --text-color: #333;
  --border-color: #e9ecef;
  --transition: all 0.3s ease;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --container-width-lg: 80%;
  --container-width-md: 90%;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--body-color);
  overflow-x: hidden;
}

.container {
  width: var(--container-width-lg);
  max-width: 1200px;
  margin: 0 auto;
}

section {
  padding: 100px 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative; /* Add this for the active indicator */
  overflow: hidden; /* Ensure the hover effect stays within the button */
}

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

.primary-btn:hover {
  background-color: transparent;
  color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.4);
}

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

.secondary-btn:hover {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.4);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

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

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  z-index: 1000;
  transition: var(--transition);
}

header.scrolled {
  background-color: white;
  box-shadow: var(--shadow);
}

nav {
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

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

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--dark-color);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--light-color);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(74, 108, 247, 0.1) 0%, rgba(74, 108, 247, 0.05) 100%);
}

.hero-content {
  max-width: 700px;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.hero-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
}

.cta-buttons {
  display: flex;
  gap: 20px;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  align-items: start;
}

.about-image {
  position: relative;
}

.image-container {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow);
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.image-container::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100%;
  height: 100%;
  border: 5px solid var(--primary-color);
  border-radius: 50%;
  z-index: -1;
}

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

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.about-text p {
  margin-bottom: 20px;
}

.experience-item,
.certification-item {
  margin-bottom: 20px;
  padding-left: 15px;
  border-left: 3px solid var(--primary-color);
}

.experience-item h4,
.certification-item h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.experience-item i,
.certification-item i {
  color: var(--primary-color);
}

.personal-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 30px 0;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-title {
  font-weight: 600;
  color: var(--secondary-color);
}

.social-profiles {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background-color: var(--light-color);
  border-radius: 50px;
  font-weight: 500;
  transition: var(--transition);
}

.social-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.download-btn {
  margin-top: 10px;
}

/* Projects Section */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border: none;
  background-color: var(--light-color);
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

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

.project-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
}

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

.project-img img {
  transition: var(--transition);
}

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

.project-info {
  padding: 20px;
}

.project-info h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.project-info p {
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.project-tags span {
  background-color: var(--light-color);
  padding: 5px 10px;
  border-radius: 50px;
  font-size: 0.8rem;
}

.project-links {
  display: flex;
  gap: 15px;
}

.project-link {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.9rem;
}

.project-link:hover {
  text-decoration: underline;
}

/* Skills Section */
.skills-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
  align-items: start;
}

.skills-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.skill-category h4 {
  margin-bottom: 20px;
  font-size: 1.3rem;
  color: var(--dark-color);
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skill-bar {
  width: 100%;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.skill-progress {
  height: 8px;
  background-color: var(--light-color);
  border-radius: 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 10px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tags span {
  background-color: var(--light-color);
  padding: 8px 15px;
  border-radius: 50px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.skill-tags span:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
}

.contact-info h3,
.contact-form h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.contact-info p {
  margin-bottom: 30px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

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

.contact-item h4 {
  margin-bottom: 5px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--light-color);
  color: var(--primary-color);
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

.error-message {
  color: var(--danger-color);
  font-size: 0.8rem;
  position: absolute;
  bottom: -18px;
  left: 0;
}

.submit-btn {
  width: 100%;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 30px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: white;
}

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

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--dark-color);
}

/* Add this for active section indicator */
.btn.active-section {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.4);
}

/* Add this for better focus states for accessibility */
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.5);
}

/* Add a subtle animation for button clicks */
.btn:active {
  transform: translateY(2px);
  transition: transform 0.1s;
}

/* Media Queries */
@media screen and (max-width: 1024px) {
  :root {
    --container-width-md: 90%;
  }

  .container {
    width: var(--container-width-md);
  }

  .about-content,
  .skills-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .hero-content h1 {
    font-size: 3rem;
  }

  .hero-content h2 {
    font-size: 1.8rem;
  }

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

@media screen and (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 70%;
    height: calc(100vh - 80px);
    background-color: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
  }

  .nav-links.active {
    right: 0;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .cta-buttons .btn {
    width: 100%;
    padding: 15px 30px; /* Larger touch target on mobile */
  }

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

  .personal-info {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content h2 {
    font-size: 1.5rem;
  }

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

  .project-filters {
    flex-direction: column;
    align-items: center;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }
}

