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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  color: #222;
  background: #fdfdfd;
  line-height: 1.6;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 700;
  font-size: 1.4rem;
}

nav {
  display: flex;
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: #222;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #0078ff;
}

/* Menu + Theme icons */
#menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

.right-icons {
  display: flex;
  align-items: center;
}

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  margin-left: 15px;
  transition: transform 0.3s;
}

#theme-toggle:hover {
  transform: scale(1.2);
}

/* Hero Section */
#hero {
  text-align: center;
  padding: 120px 20px;
  background: linear-gradient(to right, #e0f7fa, #f1f8e9);
}

#hero h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

#hero span {
  color: #0078ff;
}

#hero p {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.btn {
  background: #0078ff;
  color: white;
  padding: 10px 25px;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn:hover {
  background: #005ecb;
}

/* Sections */
section {
  padding: 80px 50px;
  max-width: 1000px;
  margin: auto;
  text-align: center;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.project {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

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

.project img {
  width: 100%;
  border-radius: 10px;
}

/* Contact */
#contact a {
  color: #0078ff;
  text-decoration: none;
}

#contact a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #0078ff;
  color: white;
  margin-top: 40px;
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

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

/* ---- Dark Mode Styles ---- */
body.dark {
  background: #111;
  color: #eee;
}

body.dark header {
  background: #1b1b1b;
  box-shadow: 0 2px 5px rgba(255,255,255,0.05);
}

body.dark nav a {
  color: #eee;
}

body.dark nav a:hover {
  color: #7cb8ff;
}

body.dark .btn {
  background: #7cb8ff;
  color: #000;
}

body.dark .project {
  background: #1b1b1b;
  box-shadow: 0 2px 6px rgba(255,255,255,0.05);
}

body.dark footer {
  background: #1b1b1b;
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 70px;
    right: 0;
    width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }

  nav a {
    padding: 10px;
    border-bottom: 1px solid #eee;
  }

  #menu-toggle {
    display: block;
  }

  nav.active {
    display: flex;
  }

  body.dark nav {
    background: #1b1b1b;
  }

  body.dark nav a {
    border-bottom: 1px solid #333;
  }
}