/* ==== Reset ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}
body {
  line-height: 1.6;
  background-color: #f5f5f5;
}

/* ==== Navbar ==== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 15px 50px;
  z-index: 1000;
}
nav .logo { font-size: 20px; font-weight: bold; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; }
nav ul li { margin: 0 15px; }
nav ul li a {
  color: #ffffff;
  text-decoration: none;
  transition: 0.3s;
}
nav ul li a:hover { color: #ff9800; }

/* ==== Sections ==== */
section {
  min-height: 100vh;     /* keeps it full screen if content is small */
  padding: 120px 20px 60px;  /* top padding for navbar spacing */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  background-size: cover;
  background-position: center;
  color: rgb(0, 0, 0);
}
#home, #about, #projects, #contact {
  
  background-image: url("assets/backgound.png");
}
h2 {
  margin-bottom: 20px;
  font-size: 32px;
  color: #ffffff;
}

/* ==== Hero Grid ==== */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;  /* flexible ratio */
  gap: 30px;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}
.hero-grid img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 5%;
  object-fit: cover;
}
.hero-grid h1 {
  font-size: 42px;
  color: rgb(182, 3, 3);
}
.hero-grid p {
  font-size: 18px;
  margin-top: 10px;
  color: white;
  text-align: justify;
}
/* Resume Download Button */
.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 20px;
  background-color: rgb(182, 3, 3);
  color: white;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.resume-btn:hover {
  background-color: #a00202;
  transform: scale(1.05);
}



/* About Section */
#about {
  padding: 80px 20px;
  background: #000; /* solid black instead of gradient */
  color: white;
  font-family: 'Arial', sans-serif;
  text-align: justify;
  overflow-x: hidden; /* prevent horizontal scroll */
}

.about-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.about-image {
  flex: 1 1 300px;
  text-align: center;
}

.about-image img {
  width: 100%;
  max-width: 300px; /* keeps it neat */
  height: auto;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.about-text {
  flex: 1 1 500px;
  max-width: 500px;
}

.about-text h2 {
  font-size: 32px;
  margin-bottom: 15px;
  text-align: center;
  color: red;
}

.about-text p {
  font-size: 16px;
  line-height: 1.6;
}

/* ===== Responsive Fixes ===== */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    max-width: 100%;
    padding: 0 10px;
  }

  .about-text h2 {
    font-size: 24px;
  }

  .about-text p {
    font-size: 15px;
    text-align: justify;
  }

  .about-image img {
    max-width: 90%;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  #about {
    padding: 50px 15px;
  }

  .about-text h2 {
    font-size: 20px;
  }

  .about-text p {
    font-size: 14px;
  }

  .about-image img {
    max-width: 100%;
  }
}


/* ===== Responsive Fixes ===== */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column; /* stack image + text */
    text-align: center;
  }

  .about-text {
    max-width: 100%;
  }

  .about-text h2 {
    font-size: 28px;
  }

  .about-text p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  #about {
    padding: 50px 15px;
  }

  .about-text h2 {
    font-size: 24px;
  }

  .about-text p {
    font-size: 15px;
  }
}

/* ==== Projects ==== */
.projects {
  display: flex;
  gap: 20px; /* smaller gap for mobile */
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  background: rgba(16, 87, 168, 0.9);
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  width: 100%;              /* take full width of container */
  max-width: 350px;         /* limit max size for larger screens */
  text-align: center;
  flex: 1 1 300px;          /* flexible width for wrapping */
  transition: transform 0.3s ease;
}
@media(max-width: 768px) {
  .projects {
    flex-direction: column;
    align-items: center;
  }
  .card {
    width: 90%;      /* nearly full width on small screens */
    max-width: 400px;
  }
}


.card:hover {
  transform: scale(1.05);
}
/* Contact Section */
#contact {
  padding: 80px 20px;
  background: linear-gradient(135deg, #000000, #000000);
  color: white;
  font-family: 'Arial', sans-serif;
}

.contact-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap; /* stacks on mobile */
  max-width: 1200px;
  margin: 0 auto;
}

.contact-form {
  flex: 1;
  min-width: 300px;
}

.contact-form h2 {
  font-size: 36px;
  margin-bottom: 30px;
  text-align: left;
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#contactForm input,
#contactForm textarea {
  padding: 15px 20px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

#contactForm button {
  padding: 15px 20px;
  border: none;
  border-radius: 10px;
  background-color: #ff4747;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

#contactForm button:hover {
  background-color: #e63e3e;
  transform: scale(1.05);
}

.contact-image {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.contact-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .contact-container {
    flex-direction: column;
    gap: 30px;
  }

  .contact-form h2 {
    text-align: center;
  }
}

/* ==== Responsive ==== */
@media(max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;  /* balance in tablets */
  }
}
@media(max-width: 768px) {
  nav { flex-direction: column; padding: 10px 20px; }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-grid img {
    max-width: 300px;
    margin: 0 auto;
  }
  .hero-grid h1 { font-size: 28px; }
  .hero-grid p { font-size: 16px; }
  .projects { flex-direction: column; align-items: center; }
}
