/* ===========================
               🌙 Global Styles & Reset
            ============================ */
:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #38bdf8;
  --primary-dark: #0ea5e9;
  --accent: #facc15;
  --shadow: rgba(56, 189, 248, 0.5);
  --success: #10b981;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

section {
  padding: 80px 0;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--primary);
  text-align: center;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 1px;
}

h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--primary);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* ===========================
               🔝 Header & Navbar
            ============================ */
header {
  background: rgba(30, 41, 59, 0.95);
  padding: 15px 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 10px 0;
  background: rgba(15, 23, 42, 0.98);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  font-size: 24px;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: 0;
  background: var(--primary);
  transition: width 0.3s ease-in-out;
}

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

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

.nav-links a.active {
  color: var(--primary);
}

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

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text);
  z-index: 1001;
}

/* ===========================
               🦸 Hero Section
            ============================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 120px 20px 80px;
  background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)),
    url("https://images.unsplash.com/photo-1555066931-4365d14bab8c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80")
      center/cover no-repeat;
  /* background: linear-gradient(rgba(15,23,42,0.9), rgba(15,23,42,0.9)),
              url("./images/bg1.jpg") center/cover no-repeat; */
  text-align: center;
  overflow: hidden;
}

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

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

.hero span {
  color: var(--primary);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Typing effect */
.typing {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid var(--primary);
  width: 0;
  animation: typing 3s steps(28, end) forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* Fade-in text */
.fade-text {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.fade-text.show {
  opacity: 1;
  transform: translateY(0);
}

/* Button */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: var(--bg-dark);
}

/* ===========================
               👨 About
            ============================ */
.about {
  text-align: center;
}

.about p {
  margin: 20px 0;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.about span {
  color: var(--primary);
  font-weight: bold;
}

.about strong {
  color: var(--accent);
}

/* ===========================
               🛠️ Skills
            ============================ */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.skill-category {
  background: var(--bg-card);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
}

.skill-category h3 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill {
  margin: 15px 0;
}

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

.skill-name {
  font-weight: 600;
}

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

.progress {
  background: #334155;
  border-radius: 10px;
  overflow: hidden;
  height: 10px;
}

.progress-bar {
  height: 100%;
  border-radius: 10px;
  width: 0;
  transition: width 1.5s ease-in-out;
}

.html {
  background: #e34f26;
}
.css {
  background: #264de4;
}
.js {
  background: #f7df1e;
}
.bootstrap {
  background: #7952b3;
}
.react {
  background: #61dafb;
}
.nextjs {
  background: #000000;
}
.git {
  background: #f05032;
}
.responsive {
  background: #0acf83;
}

/* ===========================
               🛎️ Services
            ============================ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border: 1px solid rgba(56, 189, 248, 0.1);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.3);
}

.service-card i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 20px;
}

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

.service-card p {
  color: var(--text-muted);
}

/* ===========================
               📂 Projects
            ============================ */

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

.project-card {
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border: 1px solid rgba(56, 189, 248, 0.1);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}

.project-img {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: #2d3748;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.project-img video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-img .placeholder {
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
  padding: 20px;
}

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

.project-content {
  padding: 20px;
}

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

.project-content p {
  color: var(--text-muted);
  margin-bottom: 15px;
  font-size: 0.95rem;
  line-height: 1.5;
}

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

.project-links a {
  flex: 1;
  text-align: center;
  padding: 10px 15px;
  border-radius: 5px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.project-links a:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.project-links a:last-child {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.project-links a:last-child:hover {
  background: var(--primary);
  color: white;
}

.load-more-container {
  text-align: center;
  margin-top: 40px;
}

/* Project card hidden state */
.project-card.hidden {
  display: none;
}
/* Project filter */
.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
}
/* Responsive adjustments */
@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-links {
    flex-direction: column;
  }
}
/* ===========================
               📜 Certificate
            ============================ */
.certificate-container {
  max-width: 800px;
  margin: 40px auto 0;
  text-align: center;
}

.certificate-img {
  width: 100%;
  max-width: 700px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.certificate-img:hover {
  transform: scale(1.02);
}

/* ===========================
               💬 Testimonials
            ============================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  position: relative;
  border: 1px solid rgba(56, 189, 248, 0.1);
}

.testimonial-card:hover {
  transform: translateY(-5px);
}

.testimonial-card::before {
  content: "";
  font-size: 5rem;
  color: var(--primary);
  opacity: 0.2;
  position: absolute;
  top: 10px;
  left: 20px;
  line-height: 1;
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.testimonial-card h4 {
  color: var(--primary);
  font-weight: 600;
}

/* ===========================
               📩 Contact
            ============================ */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
  margin-top: 40px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--bg-card);
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.contact-item:hover {
  transform: translateX(5px);
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 50%;
}

.contact-item div h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--primary);
}

.contact-item div p {
  color: var(--text-muted);
}

.contact-form {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #334155;
  border-radius: 5px;
  background: #0f172a;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

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

/* ===========================
               ⚡ Footer
            ============================ */
footer {
  background: var(--bg-card);
  padding: 40px 0 20px;
  text-align: center;
}

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

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-dark);
  color: var(--primary);
  font-size: 1.3rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  background: var(--primary);
  color: var(--bg-dark);
  transform: translateY(-5px);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 20px;
}

/* ===========================
               🔄 Back to Top Button
            ============================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

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

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ===========================
               📱 Responsive Design
            ============================ */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    gap: 0;
    padding: 100px 30px 30px;
    transition: 0.5s ease;
    z-index: 999;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid #334155;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 250px;
  }

  h2 {
    font-size: 2rem;
  }

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

  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .service-card,
  .skill-category,
  .testimonial-card {
    padding: 20px;
  }
}

/* Animation for section reveal */
.section-hidden {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.section-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Project card hidden state */
.project-card.hidden {
  display: none;
}
