/* Reset default spacing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


body {
  font-family: 'Montserrat', sans-serif;
  background-color: #fdfdfd;
  color: #333;
  line-height: 1.6;
}

/* NAVIGATION BAR */
/* Keep header white in all modes */
header {
  background-color: rgb(255, 255, 255);
  padding: 15px 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 20px; /* You can adjust this */
}

.pages-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  gap: 1rem;
}

.myname h4 {
  font-size: 24px;
  color: #7e560e;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 25px;
}

.pages a {
  text-decoration: none;
  color: #444;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.pages a:hover,
.pages a:focus {
  background-color: #b34802;
  color: #fff;
}

/* ====== Base Nav Spacing ====== */
.nav-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ====== Hamburger button (hidden on desktop) ====== */
.hamburger {
  display: none; /* shown via media query */
  width: 40px;
  height: 40px;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.hamburger .bar {
  display: block;
  height: 2px;
  width: 100%;
  margin: 5px 0;
  background: #444;
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}

/* Dark mode bars */
.dark-mode .hamburger .bar { background: #f1f1f1; }

/* Animated "X" state */
.hamburger.is-open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ====== Mobile drawer defaults (hidden on desktop) ====== */
@media (max-width: 768px) {
  .hamburger { display: inline-block; }

  /* Turn nav-links into a drawer */
  .nav-links {
    position: fixed;
    top: 0;
    right: -85%;           /* hidden off-screen */
    width: 75%;
    max-width: 320px;
    height: 100vh;
    padding: 80px 20px 20px; /* space for header area */
    background: #ffffff;
    box-shadow: -8px 0 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: right 0.28s ease-in-out, background-color 0.25s ease;
    z-index: 1002;
  }

  /* Link styling inside drawer */
  .nav-links .pages a {
    display: block;
    font-size: 1.05rem;
    padding: 10px 8px;
    border-radius: 8px;
  }

  /* Dark mode drawer */
  .dark-mode .nav-links {
    background: #1a1a1a;
    box-shadow: -8px 0 24px rgba(0,0,0,0.45);
  }

  /* When open */
  body.nav-open .nav-links { right: 0; }

  /* Backdrop */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.32);
    z-index: 1001;
  }
}

/* Prevent page scroll when drawer open */
body.nav-open {
  overflow: hidden;
}

/* Theme switcher position */

.theme-switcher button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #444;
}

/* DARK MODE GLOBAL STYLES */
body.dark-mode {
  background-color: #121212;
  color: #f1f1f1;
}

/* Override link color in dark mode */
body.dark-mode .pages a {
  color: #ffffff;
}

body.dark-mode .pages a:hover,
body.dark-mode .pages a:focus {
  background-color: #997105;
  color: #121212;
}

/* Toggle icon color updates in dark mode */
body.dark-mode .theme-switcher button {
  color: #f1f1f1;
}

/*updates animated text color in dark mode*/
body.dark-mode #animated-text {
  color: #f1f1f1; 
}

/* Header background in dark mode */
body.dark-mode header {
  background-color: #2c2c2c;  
}

body.dark-mode .myname h4 {  /*we use . when the element is a class and then we use # when it is an ID*/
  color: #3dd9c1; 
}

/* SECTION STYLING */
/* Home Section */
/* Responsive background image */
#home {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Content on top of image */
.home-content {
  position: relative;
  z-index: 2;
  color: #a8772d;
  text-align: center;
  padding: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Animating the rotating words */
#animated-text {
  font-weight: bold;
  color: #000000;
  animation: fadeIn 1s ease-in-out;
}

/*in dark mode*/
.dark-mode #home h1,
.dark-mode #home h2,
.dark-mode #home p {
  color: #3dd9c1;
}


/* Responsive text sizes */
h1 {
  font-size: 3rem;
}
h2 {
  font-size: 1.8rem;
}
p {
  font-size: 1.5rem;
  margin-top: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.4rem;
  }
  p {
    font-size: 1.2rem;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fadeIn {
  animation: fadeIn 1s ease-in-out;
}

.cv-button {
  text-align: center;
  margin-top: 2rem;
}
/* CV Button */
.cv-button {
  text-align: center;
  margin-top: 1.5rem;
}

.cv-button a {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  background: linear-gradient(135deg, #997105, #f3b408);
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.cv-button a:hover {
  background: linear-gradient(135deg, #f3b408, #997105);
  transform: translateY(-3px) scale(1.03);
}

/* projects section */
#projects {
  padding: 4rem 2rem;
  background-color: #eeeeee;
}

#projects h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color:#997105;
}

.dark-mode #projects h2{
  color: #3dd9c1;
}  
.dark-mode #projects {
  background-color: #2c2c2c;
}
.projects-container {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .projects-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background-color: var(--card-bg, lab(94.87% 0.34 0.11));
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.project-info {
  flex-grow: 1;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-info h3 {
  font-size: 1.1rem;
  color: var(--accent-color);
  margin-bottom: 0.8rem;
}

.project-info p {
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-link {
  align-self: flex-start;
  color: var(--accent-color);
  font-weight: bold;
  text-decoration: none;
  margin-top: auto;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: var(--accent-hover, #f88e04);
}


/* === Maps Section === */
#gallery {
  padding: 4rem 2rem;
  background-color: #ffffff;
  text-align: center;
}

#gallery h2 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: var(--accent-color);
}

/* === Gallery Grid === */
.maps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

/* === Fancy Map Card === */
.map-card {
  background-color: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 100%;
}

.map-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

/* === Map Image Styling: Maintain Full Size === */
.map-card img {
  width: 100%;
  height: auto;
  display: block;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* === Map Title Only === */
.map-info {
  padding: 1rem;
  text-align: center;
}

.map-info h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--accent-color);
  font-weight: bold;
}

/* === Dark Mode Support === */
.dark-mode #gallery {
  background-color: #2c2c2c;
}

.dark-mode .map-card {
  background-color: #2c2c2c;
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.08);
}

.dark-mode .map-info h3 {
  color: var(--accent-color);
}


/* ===Professional Engagements === */
#engagements {
  padding: 5rem 2rem;
  background-color: #eeeeee;
}

#engagements h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 3rem;
  color: #997105;
  position: relative;
  z-index: 2;
}

#engagements h3 {
  color: #997105;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.engagements-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  position: relative;
  z-index: 1;
}

/* === Fancy Engagement Card === */
.engagement-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

.engagement-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.engagement-card img {
  width: 100%;
  height: 220px; /* Slightly taller for more visibility */
  object-fit: cover;
  object-position: 50% 5%; /* Show more of the top area */
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.engagement-info {
  background: #f0f0f0;
  padding: 1.5rem;
  margin-top: -30px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease-in-out;
}

.engagement-info:hover {
  background: #ebd6ac;
}

/* === Info Text === */
.engagement-info .role {
  font-style: italic;
  font-weight: bold;
  font-size: 0.95rem;
  margin-top: 6px;
  color: #444;
}

.engagement-info .organization {
  font-style: italic;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 4px;
  color: #555;
}

.engagement-info .location-date {
  font-style: italic;
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 4px;
  color: #777;
}

/* === Filter Buttons === */
.year-filters {
  text-align: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: none;
  border: 2px solid #997105;
  color: #997105;
  padding: 0.5rem 1.2rem;
  margin: 0 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 30px;
  transition: all 0.3s ease-in-out;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: #997105;
  color: #fff;
}

/* === Hide filtered cards === */
.engagement-card.hide {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: absolute;
}

/* === Dark Mode === */
.dark-mode #engagements {
  background-color: #2c2c2c;
}

.dark-mode #engagements h2,
.dark-mode #engagements h3,
.dark-mode #engagements a {
  color: #3dd9c1;
}

.dark-mode .engagement-card {
  background-color: #2c2c2c;
  box-shadow: 0 10px 25px #2c2c2c(0, 0, 0, 0.4);
}

.dark-mode .engagement-card img {
  border-bottom-color: #3dd9c1;
}

.dark-mode .engagement-info {
  background-color: #2c2c2c;
  box-shadow: 0 6px 16px #2c2c2c(0, 0, 0, 0.2);
}

.dark-mode .engagement-info:hover {
  background-color: #818181;
}

.dark-mode .engagement-info .role,
.dark-mode .engagement-info .organization,
.dark-mode .engagement-info .location-date {
  color: #e0e0e0;
}

.dark-mode .filter-btn {
  border-color: #3dd9c1;
  color: #3dd9c1;
}

.dark-mode .filter-btn:hover,
.dark-mode .filter-btn.active {
  background-color: #3dd9c1;
  color: #121212;
}

.dark-mode {
  --card-bg: #2a2a2a;
  --text-color: #e5e5e5;
  --accent-color: #3dd9c1;
  --accent-hover: #3dd9c1;
}

:root {
  --accent-color: #997105; /* orange/brown for light mode */
  --accent-color-dark: #00a496;
  --card-bg: #fdfdfd;
  --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  --text-color: #333;
}

/* === Contact Section === */
#contact {
  padding: 4rem 2rem;
  background: #ffffff;
}

#contact .section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: #997105;
}

.dark-mode #contact {
  background: #121212;
}
.dark-mode #contact .section-title {
  color: #3dd9c1;
}

/* Contact cards */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.contact-card {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  padding: 1.2rem;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}
.contact-card i {
  font-size: 1.6rem;
  margin-bottom: .4rem;
  color: #997105;
}
.contact-card h3 {
  margin-bottom: .2rem;
  color: #997105;
  font-size: 1rem;
}
.contact-card a {
  color: #444;
  text-decoration: none;
  word-break: break-word;
}
.dark-mode .contact-card {
  background: #1e1e1e;
  box-shadow: 0 6px 16px rgba(255,255,255,0.06);
}
.dark-mode .contact-card i,
.dark-mode .contact-card h3 {
  color: #3dd9c1;
}
.dark-mode .contact-card a {
  color: #ddd;
}

/* Contact form */
#contact-form {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card-bg, #fff);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  padding: 1.5rem;
}
.dark-mode #contact-form {
  background: #1e1e1e;
  box-shadow: 0 6px 16px rgba(255,255,255,0.06);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 720px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.form-field {
  display: flex;
  flex-direction: column;
}

#contact-form label {
  font-weight: 600;
  margin-bottom: .25rem;
  color: #5a5a5a;
}
.dark-mode #contact-form label { color: #cfcfcf; }

#contact-form input,
#contact-form textarea {
  padding: 0.75rem 0.9rem;
  border: 1.5px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  color: #222;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
#contact-form textarea { resize: vertical; }

#contact-form input:focus,
#contact-form textarea:focus {
  border-color: #997105;
  box-shadow: 0 0 0 3px rgba(153,113,5,0.15);
}
.dark-mode #contact-form input,
.dark-mode #contact-form textarea {
  background: #2c2c2c;
  border-color: #2b2b2b;
  color: #eee;
}
.dark-mode #contact-form input:focus,
.dark-mode #contact-form textarea:focus {
  border-color: #3dd9c1;
  box-shadow: 0 0 0 3px rgba(61,217,193,0.18);
}

/* Errors */
.error {
  border-color: #d9534f !important;
  box-shadow: 0 0 0 3px rgba(217,83,79,0.12) !important;
}
.error-msg {
  color: #d9534f;
  min-height: 1.1em;
  margin-top: .25rem;
  font-size: .85rem;
}

/* Submit button */
.send-btn {
  margin-top: .75rem;
  background: #997105;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .75rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s ease, transform .08s ease;
}
.send-btn:hover { background: #b3820a; }
.send-btn:active { transform: translateY(1px); }
.dark-mode .send-btn {
  background: #3dd9c1;
  color: #121212;
}
.dark-mode .send-btn:hover { background: #36c7b0; }

/* Toast */
.form-toast {
  margin-top: .9rem;
  font-weight: 600;
  color: #2e7d32; /* success green */
}
.dark-mode .form-toast { color: #6ee7c8; }

/* keep anchors clear of sticky header */
section { scroll-margin-top: 90px; }

/* active link look */
.pages a.active { background-color: #b34802; color: #fff; }
.dark-mode .pages a.active { background-color: #3dd9c1; color: #121212; }

/* === Footer === */
.site-footer {
  background-color: #f3f3f3; /* default light background */
  color: #121212; /* dark text for light mode */
  padding: 20px 40px;
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* Social Icons */
.social-icons a {
  color: #121212; /* visible in light mode */
  margin-right: 15px;
  font-size: 20px;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #f36e6e; /* Optional: hover color */
}

/* Copyright */
.footer-copy {
  text-align: right;
}

/* === Dark Mode Footer === */
body.dark-mode .site-footer {
  background-color: #5e5e5e52;
  color: #ffffff;
}

body.dark-mode .social-icons a {
  color: #ffffff;
}

body.dark-mode .social-icons a:hover {
  color: #3dd9c1; /* matches your accent color in dark mode */
}
