/* ===== Global Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  line-height: 1.7;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #1e1e1e;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar.scrolled {
  padding: 0.8rem 5%;
  background-color: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(10px);
}

.logo {
  font-size: 1rem;
  font-weight: 700;
  color: #00d4ff;
}

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

.nav-list a {
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-list a:hover {
  color: #00d4ff;
}

.nav-list a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #00d4ff;
  transition: width 0.3s ease;
}

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

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: #e0e0e0;
  margin: 4px 0;
  transition: 0.3s;
  border-radius: 2px;
}

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

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

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

/* ===== Main ===== */
main {
  margin-top: 80px;
  padding: 2rem 5%;
}

section {
  padding: 4rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

/* Home */
#home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
  min-height: calc(100vh - 80px);
  padding: 6rem 5% 4rem;
}

#home > div:first-child {
  flex: 1;
  min-width: 300px;
}

#home h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: #ffffff;
}

#home h2 {
  font-size: 1.8rem;
  color: #00d4ff;
  font-weight: 500;
}

#home img {
  max-width: 300px;
  width: 90%;
  min-width: 200px;
  border-radius: 24px;
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.25);
  transition: all 0.4s ease;
  object-fit: cover;
  border: 3px solid #00d4ff;
}

#home img:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 212, 255, 0.35);
}

/* Section Titles */
section h2 {
  font-size: 2.2rem;
  color: #00d4ff;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

section h2::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 4px;
  background-color: #00d4ff;
  bottom: -10px;
  left: 0;
  border-radius: 2px;
}

/* Lists */
#education ul,
#skills ul,
#experience ul,
#certifications ul,
#freelance ul,
#contact ul {
  list-style: none;
  max-width: 800px;
  margin: 0 auto;
}

#education li,
#skills li,
#experience li,
#certifications li,
#freelance li,
#contact li {
  background-color: #1e1e1e;
  padding: 1rem 1.5rem;
  margin: 0.8rem 0;
  border-radius: 12px;
  border-left: 4px solid #00d4ff;
  transition: all 0.3s ease;
}

#education li:hover,
#skills li:hover,
#experience li:hover,
#certifications li:hover,
#freelance li:hover,
#contact li:hover {
  transform: translateX(10px);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.1);
}

/* Projects */
#projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: #1e1e1e;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  border: 1px solid #333;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 15px 30px rgba(0, 212, 255, 0.15);
  border-color: #00d4ff;
}

.project-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card h3 {
  background-color: #00d4ff;
  color: #121212;
  padding: 1rem 1.5rem;
  font-weight: 600;
}

.project-card p {
  padding: 1.5rem;
  color: #cccccc;
}

/* Links */
#freelance a,
#contact a {
  color: #00d4ff;
  text-decoration: none;
  font-weight: 500;
}

#freelance a:hover,
#contact a:hover {
  color: #00b8d4;
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background-color: #1e1e1e;
  color: #888;
  font-size: 0.9rem;
  margin-top: 3rem;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  #home {
    flex-direction: column;
    text-align: center;
    padding-top: 8rem;
  }

  #home h1 {
    font-size: 2.8rem;
  }
  #home h2 {
    font-size: 1.5rem;
  }

  .nav-list {
    position: fixed;
    top: 70px;
    right: 0;
    height: 100vh;
    width: 250px;
    background-color: #1e1e1e;
    flex-direction: column;
    align-items: center;
    padding-top: 3rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
  }

  .nav-list.active {
    transform: translateX(0);
  }

  .menu-toggle {
    display: flex;
  }
}

@media (max-width: 576px) {
  #home h1 {
    font-size: 2.3rem;
  }
  #home h2 {
    font-size: 1.3rem;
  }
  section h2 {
    font-size: 1.8rem;
  }
  .logo {
    font-size: 1.5rem;
  }
}
