body, html {
  margin: 0;
  padding: 0;
  padding-top: 0; /* match your fixed header height */
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
}
html {
  scroll-padding-top: 80px; /* height of your fixed header */
}

/* Default styles already apply to light mode */
body.light-mode {
  background-color: #f0f0f0;
  color: #222;
}
/* 🌙 Dark mode */
body.dark-mode {
  background-color:#1f260d;
  color: #e0e0e0;
}

.main-header.light-mode {
  background-color: #6596ec;
  color: white;
}
.main-header.dark-mode {
  background-color: #4f0202;
  color: #f1f1f1;
}

.hero.light-mode {
  background-color: #dde2ea;
}
.hero.dark-mode {
  background-color: #1f260d;
}

.hero-button.dark-mode {
  background-color:  rgba(15, 34, 163, 0.7);
  color: white;
}
.hero-button.dark-mode:hover {
  background-color:#1f260d;
}

.hero {
  min-height: 100vh;
  background-image: url('images/40422183.jpg');
  background-position: left center;
  background-size: 50%;
  background-repeat: no-repeat;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 2rem;
  padding-top: 80px;
  box-sizing: border-box;
  overflow: hidden;
  background-color: #eaedf4; /* in case image doesn't cover fully */
}

.hero-content {
  max-width: 40%;
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: rgb(67, 65, 165);
}
.hero p {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: rgb(67, 65, 165);
}
.hero-button {
  background-color: #6596ec;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.hero-button:hover {
  background-color: #c20808;
}
.main-header {
  position: fixed;
  top: 0;
  left:0;
  width: 100%;
  
  padding: 20px 40px;
  z-index:999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #6596ec;/* semi-transparent background */
  color: white;
  box-shadow: 0 2px 8px rgba(225, 217, 217, 0.2);
  transition: all 0.3s ease; /* smooth transition */
}


.nav-links a {
  color:white;
  text-decoration: none;
  margin-right: 70px;
  font-weight: bold;
}

.nav-links a:hover {
  color:rgba(15, 34, 163, 0.7); /* gold on hover */
}
body.dark-mode .nav-links a:hover {
  color: white;
}
#about{
 
  padding-top:1rem;
  text-align: left;
  margin-left: 50px;
}
#about h2 {
  text-align: left;
  margin-bottom: 1rem;
  font-size: 2rem;
  color: rgb(67, 65, 165);
}
.about-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;

}
.about-text {
  flex: 1;
  text-align:justify;
  line-height: 1.6;
}
.profile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.typewriter {
  color: rgb(67, 65, 165);
  font-weight: bold;
  overflow: hidden;
  border-right: 2px solid #6596ec;
  white-space: nowrap;
  margin-top: 5rem;
  width: 0;
  font-size: 24px;
  margin-left: 20px;
  text-align: justify;

  animation: typewriter-loop 6s steps(40) infinite,
             blink 0.7s step-end infinite;
}



@keyframes typewriter-loop {
  0% { width: 0 }
  40% { width: 100% }
  60% { width: 100% }
  100% { width: 0 }
}

@keyframes blink {
  50% { border-color: transparent }
}




.profile-image {
  width: 240px;
  height: 300px;
  object-fit: cover;
  border-radius: 8%;
}

.profile-image:hover {
  transform: scale(1.05);
}


/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
}
#skillsModal h2 {
  color:rgba(15, 34, 163, 0.7);
}


.skills-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.skills-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  font-weight: bold;
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

/* Dark mode modal styles */
body.dark-mode #skillsModal .modal-content {
  background-color: #1f260d;
  color: white;
}

body.dark-mode #skillsModal h2 {
  color: red;
}

body.dark-mode #skillsModal .close-btn {
  color: white;
}
/* ===== Responsive for Tablets and Mobile Devices ===== */
@media (max-width: 768px) {
  body {
    padding-top: 140px; /* more space for taller header on mobile */
  }
  .main-header {
    flex-direction: column;
    background-size: cover;
    background-position: center;
    align-items: flex-start;
    padding: 2rem 1rem; /* tighter padding for small screens */

  }
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
  }
 
  .hero-content {
    max-width: 100%;
    margin-top: 2rem;
    box-sizing: border-box;
    text-align: center;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.9); /* slight white overlay */
  }
   .about-container {
    flex-direction: column;
    text-align: center;
  }

  .profile-image {
    margin: 0 auto;
  }
.mode-toggle {
    align-self: flex-end;
    margin-left: 10px;
   
  }
  .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
  }}


  .logo{
    
    font-weight: bold;
    font-size: 36px;
    margin-left: 10px;
  }


.mode-toggle {

  color: rgb(137, 57, 57);
  margin-right: 4rem;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}

.mode-toggle:hover {
  transform: scale(1.2);
}
#backToTop {
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 999;
  background-color: #6596ec;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  display: none; /* Hidden by default */
  transition: background-color 0.3s ease;
}
@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
.hero {
    background-size: contain;
  }
  .project-item {
    width: 100%;
  }
}
/* Light mode button */
body.light-mode #backToTop {
  background-color: #6596ec;
  color: white;
}
body.light-mode #backToTop:hover {
  background-color: #c20808;
}

/* Dark mode button */
body.dark-mode #backToTop {
  background-color: #4a0909;
  color: #f0f0f0;
}


/*   projects:   */


.projects-section {
  padding: 4rem 2rem;
  text-align: center;
  background-color: #f8f9fa;
}

body.dark-mode .projects-section {
  background-color: #1f260d;
  color: #eee;
}

.projects-section h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
   color: rgb(67, 65, 165);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns */
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.project-item img:hover {
  transform: scale(1.05);
}
.projects-section {
  max-width: 1000px;  /* Set the overall width */
  margin: 0 auto;     /* Center the section horizontally */
  padding: 25px 20px; /* Top/bottom and left/right padding */
}


/*   Education:   */
#education {
  padding: 4rem 4rem;
  text-align: left;
  background-color:#e0e0e0;
}
body.dark-mode #education {
  background-color:#1f260d;
  color: #eee;
}
#education h3 {
  font-size: 2rem;
  margin-top:0.2rem;
  color: rgb(67, 65, 165);
}

body.dark-mode #education h3 {
  color: rgb(67, 65, 165);
}
.education-item {
  max-width: 800px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.6;
}
body.dark-mode .education-item {
  background-color:#4f0202;
  color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
@media (max-width: 768px) {
  #education {
    padding: 2rem 1rem;
  }

  .education-item {
    font-size: 1rem;
    padding: 1.5rem;
  }
}







/*    FORM   */
.contact-section {
  overflow: auto;
  padding: 4rem 2rem;
  padding-top: 3rem;
  border-top: 1px solid transparent; /* forces margin containment */
  background-size: 30%;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: #fff;
}

.contact-section h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 2rem;
  color: rgb(67, 65, 165);
}

.form-wrapper {
  background-color:rgb(243, 226, 226); /* semi-transparent overlay */
  max-width: 300px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 10px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  font-weight: bold;
  text-align: left;
  color: #6596ec;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  margin: 0 auto; 
  font-size: 1rem;
  border-radius: 5px;
  border: none;
  width: 90%;
  box-sizing: border-box;
}

.submit-button {
  background-color: #6596ec;
  color: white;
  padding: 10px;
   margin: 0 auto; 
  width:40%;
  font-size:16px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor:pointer;
  transition: background-color 0.3s ease;
}

.submit-button:hover {
  background-color: #c20808;
}
.confirmation-message {
  display: none;
  color: green;
  font-weight: bold;
  text-align: center;
  margin-top: 1rem;
}


body.light-mode .form-wrapper {
  background-color: rgb(243, 226, 226);
  border: 2px solid #6596ec; 
}

/* DARK MODE FORM*/
body.dark-mode .form-wrapper {
  background-color:#222;
    border: 2px solid white

}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background-color:  #4a0909;
  color: #fff;
}

body.dark-mode .contact-form label {
  color: #ddd;
}

body.dark-mode .submit-button {
  background-color: #4a0909;
}

body.dark-mode .submit-button:hover {
  background-color:#1f260d;
}
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links a {
    padding: 10px 0;
    margin: 0;
    width: 100%;
    display: block;
    font-size: 18px;
  }
}
@media (max-width: 768px) {
  .about-text {
    text-align: left; /* or center */
    padding: 0 10px;
  }
}
@media (max-width: 480px) {
  .hero {
    background-size: cover;
    background-position: center;
    background-image: none;
    background-color: #dde2ea;
  }
}
@media (max-width: 768px) {
  h1, h2, h3 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }
}
.footer {
  text-align: center;
  padding: 0.2rem;
  background-color: #6596ec;
  color: white;
  font-size: 1rem;
 
}
body.dark-mode .footer {
  background-color: #4f0202;
}

.nav-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem;
}

@media (max-width: 768px) {
  body {
    padding-top: 200px; /* account for taller nav */
  }

  h1, h2, h3 {
    font-size: 1.5rem;
  }

  .main-header {
    flex-direction: column;
    background-size: cover;
    background-position: center;
    align-items: flex-start;
    padding: 2rem 1rem;
  }

  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-position: center top;
    background-size: cover;
  }

  .hero-content {
    max-width: 100%;
    margin-top: 2rem;
    box-sizing: border-box;
    text-align: center;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.9);
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    text-align: left;
    padding: 0 10px;
  }

  .education-item {
    font-size: 1rem;
    padding: 1.5rem;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .nav-links a {
    padding: 10px 0;
    margin: 0;
    width: 100%;
    display: block;
    font-size: 18px;
  }

  .mode-toggle {
    align-self: flex-end;
    margin-left: 10px;
  }
}
@keyframes typewriter-loop {
  0% { width: 0 }
  30% { width: 100% }
  70% { width: 100% }
  100% { width: 0 }
}

.nav-links a {
  color: white;
  text-decoration: none;
  margin-right: 40px;  /* reduced spacing */
  font-weight: 400;    /* lighter */
  font-size: 14px;     /* smaller text */
  padding: 5px 0;      /* tighter spacing */
  
}