/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  line-height: 1.6;
  color: #fff;
  background: url("image/background.jpg") no-repeat center center fixed;
  background-size: cover;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: rgba(0, 0, 0, 0.7);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  flex-wrap: nowrap;
}

.navbar .logo {
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  flex-shrink: 0;
}
.navbar .logo span {
  color: #ff4b2b;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
  align-items: center;
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: 0.3s;
}
.nav-links a:hover {
  color: #ff4b2b;
}

#darkModeToggle {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #fff;
}

/* Hamburger Menu */
.menu-toggle {
  display: none; /* hidden by default */
  font-size: 26px;
  color: #fff;
  cursor: pointer;
}

/* Show only on mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: block; /* visible on mobile */
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    max-height: 0; /* collapsed by default */
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.show {
    max-height: 400px; /* expands when toggled */
    padding: 10px 0;
  }
}
/* Desktop nav-links should always show */
@media (min-width: 769px) {
  .nav-links {
    max-height: none !important;
    flex-direction: row;
    background: transparent;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #fff;
  padding: 20px;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}
.hero-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 30px;
  position: relative;
  z-index: 2;
  text-align: center;
}
.hero-text h1 {
  font-size: 36px;
  margin-bottom: 10px;
}
.hero-text p {
  font-size: 18px;
  margin-bottom: 20px;
}
.btn {
  display: inline-block;
  background-color: #ff4b2b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}
.btn:hover {
  background-color: #ff3a1a;
  transform: translateY(-5px);
}
.hero-image {
  display: flex;
  justify-content: center;
  width: 100%;
}
.hero-image .profile-pic {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 50%;
  border: 5px solid #fff;
}

/* Sections */
#projects h3 {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 30px;
  color: #ffffff;
}

.section {
  padding: 80px 20px;
  scroll-margin-top: 120px;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  margin: 40px auto;
  max-width: 1200px;
}
.section-title {
  font-size: 28px;
  margin-bottom: 30px;
  text-align: center;
}

/* Cards */
.cards {
  justify-content: center;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.card-link {
  text-decoration: none;
  color: inherit;
  flex: 1 1 200px;
}
.card {
  background-color: #ff4b2b;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
/* Section Styling */

/* Skills */
.skills {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  list-style: none;
}
.skills li {
  background-color: #ff4b2b;
  color: #fff;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: 600;
}

/* Tech Stack Logos */
.tech-stack {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.tech-stack img {
  width: 50px;
  transition: transform 0.3s;
}
.tech-stack img:hover {
  transform: scale(1.2);
}

/* Contact */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.social-icons a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Brand colors */
.social-icons a:nth-child(1) {
  background: #d93025;
} /* Gmail Red */
.social-icons a:nth-child(2) {
  background: #0077b5;
} /* LinkedIn Blue */
.social-icons a:nth-child(3) {
  background: #000000;
} /* X/Twitter Black */
.social-icons a:nth-child(4) {
  background: #333333;
} /* GitHub Dark */

/* Hover effect */
.social-icons a:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
  background-color: #000;
  color: #fff;
  text-align: center;
  padding: 15px 0;
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background-color: #ff8800;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
}
#backToTop:hover {
  background-color: #128c7e;
  transform: translateY(-3px);
}
#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}

/* ================= RESPONSIVE FIXES ================= */
@media (max-width: 992px) {
  .navbar {
    padding: 15px 20px;
  }
  .hero-text h1 {
    font-size: 28px;
  }
  .hero-text p {
    font-size: 16px;
  }
  .hero-image .profile-pic {
    max-width: 180px;
  }
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .hero-text h1 {
    font-size: 24px;
  }
  .section {
    padding: 60px 15px;
  }
  .section-title {
    font-size: 24px;
  }
  .skills li {
    font-size: 14px;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 20px;
  }
  .hero-text p {
    font-size: 14px;
  }
  .hero-image .profile-pic {
    max-width: 150px;
  }
  .tech-stack img {
    width: 40px;
  }
  .card {
    padding: 15px;
    font-size: 14px;
  }
  footer {
    font-size: 14px;
  }
}

/* ============================
   Global Alert Styling
   ============================ */
.alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  padding: 15px 20px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border: none;
  animation: fadeIn 0.6s ease;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.alert-warning {
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  color: #7a4f00;
}
.alert strong {
  font-weight: 700;
  color: #5d3700;
}
.alert .btn-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1;
  color: #5d3700;
  opacity: 0.8;
  cursor: pointer;
  margin-left: 12px;
}
.alert .btn-close::before {
  content: "✕";
}
.alert .btn-close:hover {
  opacity: 1;
  transform: scale(1.2);
  color: #000;
}
@media (max-width: 576px) {
  .alert {
    font-size: 0.95rem;
    padding: 12px 16px;
    width: 95%;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.alert.fade-out {
  opacity: 0 !important;
  transform: translate(-50%, -20px);
}
