/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  background: #f5f7fa;
  scroll-behavior: smooth;
  transition: background 0.3s, color 0.3s;
}

/* Colors */
:root {
  --primary: #1e3a8a;
  --secondary: #3b82f6;
  --accent: #ef4444;
  --light: #ffffff;
  --gray: #f1f5f9;
  --dark-bg: #121212;
  --dark-text: #e0e0e0;
}

/* Navbar */
header {
  background: var(--primary);
  color: var(--light);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;  /* space between links and icons */
}


.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links li a {
  color: var(--light);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: var(--accent);
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hamburger, .dark-mode-toggle {
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--primary);
    position: absolute;
    top: 60px;
    right: 20px;
    width: 200px;
    padding: 15px;
    border-radius: 8px;
  }
  .nav-links.show {
    display: flex;
  }
}

/* Hero Section */

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to right, var(--secondary), var(--primary));
  color: var(--light);
  padding: 40px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 1100px;
  width: 100%;
}

.hero-left {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-right {
  flex: 2;
  text-align: left;
}

.profile-pic {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--light);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.hero-right h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.hero-right span {
  color: var(--accent);
}

.hero-right p {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.hero-right .btn {
  margin-top: 20px;
}

.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to right, var(--secondary), var(--primary));
  color: var(--light);
  text-align: center;
  padding: 20px;
  transition: background 0.3s;
}


.profile-pic {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--light);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.hero-text h1 {
  font-size: 2.5rem;
}

.hero-text span {
  color: var(--accent);
}

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background: var(--accent);
  color: var(--light);
  border-radius: 5px;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover {
  background: #c53030;
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-right {
    text-align: center;
  }

  .profile-pic {
    width: 150px;
    height: 150px;
  }
}


/* Sections */
.section {
  padding: 60px 20px;
  text-align: center;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--primary);
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--light);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s, border 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  border: 2px solid var(--secondary);
}

/* Contact Form */
.contact-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.contact-form button {
  border: none;
  cursor: pointer;
}

/* Footer */
footer {
  background: var(--primary);
  color: var(--light);
  text-align: center;
  padding: 15px;
  margin-top: 30px;
}

/* Dark Mode */
body.dark-mode {
  background: var(--dark-bg);
  color: var(--dark-text);
}

body.dark-mode header {
  background: #1a1a1a;
}

body.dark-mode .section h2,
body.dark-mode .project-card h3 {
  color: var(--light);
}

body.dark-mode .project-card {
  background: #1e1e1e;
  border-color: var(--secondary);
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background: #1e1e1e;
  color: var(--light);
  border: 1px solid #444;
}

body.dark-mode .hero {
  background: linear-gradient(to right, #4f46e5, #1e40af);
}

body.dark-mode .btn {
  background: #ef4444;
}

/* Fade-in sections */
.fade-in-section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered fade-in for project cards */
.project-card.fade-in-section {
  transition-delay: 0s; /* JS will set delay dynamically */
}
