/* Base Styles */
:root {
  --primary: #3a86ff;
  --secondary: #8338ec;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --gray: #6c757d;
  --success: #38b000;
  --html: #e34c26;
  --css: #264de4;
  --js: #f0db4f;
  --sql: #00758f;
  --qa: #6b4fbb;

}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html{
  scroll-behavior: smooth;
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--secondary);
}

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

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

section {
  padding: 80px 0;
}

h1,
h2,
h3 {
  margin-bottom: 20px;
}

/* Header */
header {
  background: linear-gradient(
    135deg,
    rgba(24, 42, 80, 0.95) 0%,
    rgba(33, 56, 109, 0.95) 100%
  );
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: fixed;
  width: 100%;
  z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  background: linear-gradient(
    135deg,
    rgba(24, 42, 80, 1) 0%,
    rgba(33, 56, 109, 1) 100%
  );
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: white;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin-left: 30px;
  position: relative;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
  transition: color 0.3s ease;
  text-decoration: none;
  display: block;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: white;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover {
  color: white;
}

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

.nav-links a.active {
  color: white;
}

.nav-links a.active::after {
  content: "";
  width: 100%;
  left: 0;
}

/* Dropdown styling */
.nav-links .dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.dropdown-toggle::after {
  content: "▾";
  margin-left: 5px;
  font-size: 12px;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: -10px;
  background: linear-gradient(
    135deg,
    rgba(24, 42, 80, 0.98) 0%,
    rgba(33, 56, 109, 0.98) 100%
  );
  min-width: 200px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
  border-radius: 8px;
  padding: 8px 0;
  margin: 0;
  list-style: none;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
  padding: 0;
  width: 100%;
}

.dropdown-menu li a {
  color: rgba(255, 255, 255, 0.85);
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
}

.dropdown-menu li a::after {
  display: none;
}

.dropdown-menu li a:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Menu toggle for mobile */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  height: 20px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: white;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile styles */
@media (max-width: 768px) {
  /* Make sure dropdown menus start hidden */
  .dropdown-menu {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0;
    margin: 0;
    position: static; /* Changed from absolute to static */
    box-shadow: none; /* Remove shadow on mobile */
    background: transparent; /* Make background transparent on mobile */
    min-width: auto; /* Auto width on mobile */
    transform: none; /* No transform on mobile */
  }

  /* Show dropdown when active */
  .dropdown.active .dropdown-menu {
    display: block;
    max-height: 300px; /* Reduced from 400px */
    padding-left: 10px; /* Reduced from 15px */
    margin-top: 5px; /* Reduced from 10px */
    border-left: 1px solid rgba(255, 255, 255, 0.2); /* Add a subtle left border */
  }

  /* Ensure the toggle is clickable on the entire area */
  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding-right: 15px; /* Reduced from 20px */
  }

  /* Improve tap targets on mobile */
  .nav-links a,
  .dropdown-menu a {
    padding: 8px 0; /* Reduced from 12px */
  }

  .dropdown-menu li a {
    padding: 8px 10px; /* Reduced from 10px 15px */
    font-size: 0.95em; /* Slightly smaller font size */
  }

  /* Reduce spacing between dropdown items */
  .dropdown-menu li {
    margin: 0;
    line-height: 1.2; /* Tighter line height */
  }

  /* Add mobile menu container styling */
  .nav-links.mobile-active {
    padding: 10px; /* Add some padding to the container */
    max-height: 80vh; /* Limit height and allow scrolling */
    overflow-y: auto; /* Enable scrolling */
  }

  /* Compact spacing between main nav items */
  .nav-links li {
    margin-left: 0;
    margin-bottom: 5px; /* Small gap between items */
  }
}
/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
  color: white;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

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

/* About Section */
.about {
  background-color: white;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-image {
  flex: 1;
  text-align: center;
  padding: 20px;
}

.about-image img {
  width: 100%;
  max-width: 400px;
  height: 500px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.about-text {
  flex: 1;
}

/* Skills Section */
.skills {
  background-color: #f5f7fa;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.skill-card {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-card i {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 15px;
}

.skill-card h3 {
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  margin-top: 10px;
  position: relative;
}

.progress {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Projects Section */
.projects {
  background-color: white;
}

.projects-nav {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 10px;
}

.project-nav-item {
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f0f0f0;
}

.project-nav-item:hover {
  background-color: #e0e0e0;
}

.project-nav-item.active {
  color: white;
}

.project-nav-item.html.active {
  background-color: var(--html);
}
.project-nav-item.css.active {
  background-color: var(--css);
}
.project-nav-item.js.active {
  background-color: var(--js);
  color: var(--dark);
}
.project-nav-item.sql.active {
  background-color: var(--sql);
}
.project-nav-item.qa.active {
  background-color: var(--qa);
}

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

.project-category {
  display: none;
}

.project-category.active {
  display: block;
}

.project-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

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

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

.project-content {
  padding: 20px;
}

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

.tag {
  background-color: #e9ecef;
  color: var(--gray);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
}

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

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-title h2::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 3px;
  background: var(--primary);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Contact Section */
.contact {
  background-color: #f5f7fa;
}

.contact-content {
  display: flex;
  gap: 50px;
}

.contact-info {
  flex: 1;
}

.contact-form {
  flex: 1;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.contact-item i {
  font-size: 24px;
  color: var(--primary);
  margin-right: 15px;
}

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

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  font-size: 16px;
}

textarea.form-control {
  min-height: 150px;
}

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

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

.social-links a {
  color: white;
  font-size: 24px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
  .about-content,
  .contact-content {
    flex-direction: column;
  }

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

  .hero h1 {
    font-size: 36px;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.animated {
  animation: fadeIn 1s ease forwards;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 200;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--dark);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 200;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white; /* Changed from var(--dark) to white */
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(
      --dark
    ); /* Changed from white to var(--dark) to match header */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
  }

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

  .nav-links li {
    margin: 20px 0;
  }

  .nav-links a {
    color: white; /* Ensure links are visible against dark background */
    font-size: 18px; /* Make links slightly larger for better tap targets */
  }

  .menu-toggle.active span:first-child {
    transform: translateY(9px) rotate(45deg);
  }

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

  .menu-toggle.active span:last-child {
    transform: translateY(-9px) rotate(-45deg);
  }

  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
  }

  .nav-overlay.active {
    display: block;
  }
}
