{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #f8fafc;
  color: #1f2937;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  background: #111;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 5%;
  z-index: 1000;
  transition: 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.logo {
  font-size: 20px;
  font-weight: 600;
}

/* ===== NAV LINKS ===== */
.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s;
}

.nav-links a:hover {
  color: #2563eb;
}

/* ===== HAMBURGER ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  transition: 0.3s ease;
}

/* Animate to X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 80px 5%;
  background: linear-gradient(to right, #2563eb, #1e3a8a);
  color: white;
}

.hero h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 16px;
}

/* ===== BUTTON ===== */
.btn {
  display: inline-block;   /* fixed */
  margin-top: 20px;
  padding: 12px 28px;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s ease;
}

.btn:hover {
  background: #1d4ed8;
  transform: translateY(-3px);
}
/* ===== SECTIONS ===== */
.section {
  padding: 60px 5%;
  text-align: center;
}

.skills-container,
.projects-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.skill-card,
.project-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  transition: 0.3s ease;
  width: 250px;
}

.skill-card:hover,
.project-card:hover {
  transform: translateY(-5px);
}

/* ===== PROJECT OVERLAY ===== */
.project-image {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.project-image img {
  width: 100%;
  display: block;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(37,99,235,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  opacity: 0;
  transition: 0.3s ease;
}

.project-image:hover .overlay {
  opacity: 1;
}

/* ===== CONTACT ===== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 400px;
  margin: auto;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #2563eb;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 20px;
  background: #111;
  color: white;
}

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== DARK MODE ===== */
body.dark {
  background: #0f172a;
  color: #f1f5f9;
}

body.dark .header,
body.dark .footer {
  background: #1e293b;
}

body.dark .skill-card,
body.dark .project-card {
  background: #1e293b;
  box-shadow: none;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

  .nav-links {
    position: fixed;
    top: 60px;
    right: -100%;
    height: 100vh;
    width: 220px;
    background: #111;
    flex-direction: column;
    padding: 40px 20px;
    transition: 0.3s ease;
  }

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

  .menu-toggle {
    display: flex;
  }

  .skills-container,
  .projects-container {
    flex-direction: column;
    align-items: center;
  }
}
