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

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f9f9f9;
}

header {
  background-color: #333;
  padding: 5px 10px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* NAV-LIST SECTION */
.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-list li {
  margin: 0 10px;
}

.nav-list a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 6px 10px;
  transition: background-color 0.3s ease;
}

.nav-list a:hover,
.nav-list a:focus {
  background-color: #555;
}

/* END NAV-LIST SECTION */

.section {
  padding: 60px 40px 20px;
  /* max-width: 1000px; */
  margin: 0 auto 40px auto;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* Home Section*/
#home {
  height: 90vh; /* Takes most of the viewport */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
  background-color: #fff; /* Optional: distinguish home visually */
}

#home.section {
  background: linear-gradient(135deg, #246b59, #8cd993);
}

.scroll-indicator {
  position: absolute;
  bottom: 20px;
  font-size: 2rem;
  color: #333;
  animation: bounce 2s infinite;
  cursor: pointer;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}
/* Home Section END*/

/*  PORTFOLIO SECTION */

.portfolio-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.portfolio-item {
  background-color: #e9ecef;
  flex: 1 1 220px;
  max-width: 300px;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;

  word-wrap: break-word; /* break long words */
  overflow-wrap: break-word;
  white-space: normal; /* allow text wrap */

  min-width: 220px;
}

/* Make the first item take full width */
.portfolio-item:first-child {
  flex: 1 1 100%;
  max-width: 100%;
}

/* The rest take equally one-third width */
.portfolio-item:not(:first-child) {
  flex: 1 1 calc((100% - 40px) / 3); /* 40px accounts for two gaps of 20px */
  max-width: calc((100% - 40px) / 3);
}

.portfolio-item:hover {
  transform: scale(1.05);
}

form {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  margin-top: 20px;
}

label {
  margin: 10px 0 5px;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
textarea {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  resize: vertical;
}

button {
  margin-top: 15px;
  background-color: #333;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover,
button:focus {
  background-color: #555;
}

#form-message {
  margin-top: 15px;
  font-weight: bold;
  color: green;
}

.hidden {
  display: none;
}

/* EXPERIENCE SECTION */
.experience-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  padding: 20px 0;
  flex-wrap: wrap;
}

.left-side {
  max-width: 65%;
}

.left-side h3 {
  margin-bottom: 5px;
}

.left-side .employer {
  font-weight: bold;
  margin-bottom: 10px;
}

.left-side .tasks {
  list-style-type: disc;
  padding-left: 20px;
}

.right-side {
  max-width: 30%;
  text-align: right;
  font-style: italic;
  color: #666;
}

/* EXPERIENCE SECTION END*/

/* EDUCATION SECTION */
.education-item .details {
  color: #666;
  font-size: 0.9rem;
  margin-top: 5px;
  font-style: normal;
}

/* EDUCATION SECTION END*/

/* NAV-LIST MEDA QUERY */
/* Hide toggle button on large screens */
.nav-toggle {
  display: none;
  font-size: 2rem;
  /*   color: white;
  background: none; */
  border: none;
  cursor: pointer;
}

/* EXPERIENCE MEDIA QUERY */
@media (max-width: 700px) {
  .experience-item {
    flex-direction: column;
    gap: 10px;
  }

  .left-side,
  .right-side {
    max-width: 100%;
    text-align: left;
  }
}

/* Responsive styling */
@media (max-width: 700px) {
  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    /* background-color: #246b59; */
    position: absolute;
    top: 60px; /* adjust based on navbar height */
    left: 0;
  }

  .nav-list li {
    margin: 8px 0;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .portfolio-container {
    display: flex;
    flex-direction: column; /* stack all items vertically */
    gap: 20px;
    align-items: column;
    gap: 20px;
    justify-content: stretch;
    min-width: auto;
  }

  .portfolio-item {
    flex: 0 0 80%;
    min-width: 80%;
    max-width: unset;
    word-wrap: break-word;
    box-sizing: border-box;
  }

  .experience-item {
    flex-direction: column;
    gap: 10px;
  }

  .left-side,
  .right-side {
    max-width: 100%;
    text-align: left;
  }
}
