/* Generic Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Oswald', sans-serif;
  background: #f0f2f5;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Banner */
.top-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px;
  background-color: #6c8b6f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

.brand-name a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
}

.button-container {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.menu-toggle {
  background: white;
  border: none;
  color: #6c8b6f;
  font-size: 1.2rem;
  cursor: pointer;
  width: 36px;
  height: 32px;
  padding: 0;
  text-align: center;
  line-height: 32px;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
  display: none;
}

.menu-toggle:hover {
  background-color: #e0e8de;
}

.top-banner button:not(.menu-toggle) {
  background-color: white;
  color: #6c8b6f;
  border: none;
  width: 65px;
  height: 32px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.top-banner button:not(.menu-toggle):hover {
  background-color: #e0e8de;
}

/* Navigation Sidebar */
nav.nav {
  position: fixed;
  top: 45px;
  left: 0;
  width: 200px;
  bottom: 40px;
  background: #9CAF88;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 999;
  transform: translateX(-220px);
  opacity: 0;
  pointer-events: none;
}

nav.nav.visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.nav img {
  width: 80%;
  height: auto;
  margin: 5px 0;
  border-radius: 50%;
  object-fit: cover;
}

.nav ul {
  list-style: none;
  padding: 0;
  width: 100%;
  flex-grow: 1; /* take available space */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.nav ul li {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  text-align: center;
}

.nav ul li a {
  color: white;
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
}

.nav ul li:hover,
.nav ul li.active {
  background: #8CA179;
}

/* Sidebar Social Icons */
nav.nav .social-icons {
  margin-top: auto;       
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-bottom: 10px;
  flex-shrink: 0;
}

nav.nav .social-icons a {
  font-size: 1.5rem;
  text-decoration: none;
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

nav.nav .social-icons a[href*="facebook"] { color: #1877f2; }
nav.nav .social-icons a[href*="x.com"] { color: #000000; }
nav.nav .social-icons a[href*="instagram"] { color: #e4405f; }
nav.nav .social-icons a[href*="linkedin"] { color: #0077b5; }

nav.nav .social-icons a:hover {
  transform: scale(1.2);
  opacity: 0.9;
}

/* Main Content */
.content {
  margin-left: 200px;
  margin-top: 45px;
  margin-bottom: 40px;
  padding: 20px;
  transition: margin-left 0.3s ease, padding 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: inline-block;
  }

  nav.nav {
    bottom: 40px; /* leave space for footer */
    height: calc(100vh - 45px - 40px); /* full height minus top banner & footer */
    transform: translateX(-220px);
    opacity: 0;
    display: flex;
    flex-direction: column;
  }

  nav.nav.visible {
    transform: translateX(0);
    opacity: 1;
  }

  nav.nav ul {
    flex-grow: 1;
    overflow: hidden; /* disable scrolling */
  }

  nav.nav .social-icons {
    margin-top: auto;
    padding: 10px 0;
  }

  .content {
    margin-left: 0;
    margin-bottom: 40px; /* leave space for footer */
    padding: 20px 10px;
  }
}

@media (min-width: 769px) {
  .menu-toggle {
    display: none;
  }
}

/* Boxes */
.box {
  background: white;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  --reveal-delay: 0s;
  transition-delay: var(--reveal-delay);
}

.box.visible {
  opacity: 1;
  transform: translateY(0);
}

main .box:nth-child(1) { --reveal-delay: 0s; }
main .box:nth-child(2) { --reveal-delay: 0.15s; }
main .box:nth-child(3) { --reveal-delay: 0.3s; }
main .box:nth-child(4) { --reveal-delay: 0.45s; }
main .box:nth-child(5) { --reveal-delay: 0.6s; }

/* Box Content */
.box-banner {
  background-color: #e0e8de;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  font-size: 0.85rem;
  color: #555;
  border-bottom: 1px solid #d0d7c6;
}

.box-content {
  padding: 30px 20px;
  text-align: center;
}

h1, h2 {
  color: #333;
  margin-top: 0;
}

/* Footer */
.footer-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background-color: #6c8b6f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  font-size: 1rem;
}

.project-grid {
  display: flex;
  gap: 20px; /* space between cards */
  flex-wrap: wrap; /* wrap on smaller screens */
  justify-content: space-between;
}

.project-card {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  flex: 1 1 calc(33% - 20px); /* 3 columns with gap */
  box-sizing: border-box;
  text-align: center;
}

.project-card img {
  width: 100px;          /* Match sidebar profile photo size */
  height: 100px;         /* Equal width and height for circle */
  border-radius: 50%;   /* Makes it a circle */
  object-fit: cover;    /* Ensures image covers the area without distortion */
  margin: 0 auto 10px;  /* Center and add spacing below */
  display: block;
}

.project-card h3 {
  margin: 10px 0 5px;
}

.project-card p {
  font-size: 0.9rem;
  color: #555;
}

.project-card .btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  background-color: #6c8b6f;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.project-card .btn:hover {
  background-color: #8CA179;
}

/* Responsive for tablets and phones */
@media (max-width: 900px) {
  .project-card {
    flex: 1 1 calc(50% - 20px); /* 2 columns */
  }
}

@media (max-width: 600px) {
  .project-card {
    flex: 1 1 100%; /* 1 column */
  }
}

.contact-section {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-grid {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

/* Form on left */
.contact-form {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px 15px;
  border: 1px solid #d0d7c6;
  border-radius: 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  resize: none;
}

.contact-form button {
  background-color: #6c8b6f;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.contact-form button:hover {
  background-color: #8CA179;
}

/* Right side cards */
.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-card {
  background: #fff;
  border-radius: 10px;
  padding: 15px 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.contact-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #000; /* matches rest of website text */
}

.contact-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #000;
}

.contact-card a {
  color: #6c8b6f;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .contact-grid {
    flex-direction: column;
  }

  .contact-form, .contact-info {
    flex: 1 1 100%;
  }
}

.contact-form .form-message {
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #f8d7da;
  color: #721c24;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
  transition: opacity 0.5s ease;
}
