/* Updated Color Palette - Light Gray, White Content, Dark Blue */
:root {
  --background: #f5f5f5;
  --content-bg: #ffffff;
  --primary: #1e3a8a;
  --primary-light: #3b5998;
  --accent: #2563eb;
  --text: #333333;
  --text-light: #666666;
  --shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  --font: 'Poppins', sans-serif;
}

/* Base Styles */
body {
  font-family: var(--font);
  margin: 0;
  padding: 0;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
}

.navbar {
  background-color: var(--content-bg);
  color: var(--text);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 15px 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.navbar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

.navbar-nav {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.navbar-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 12px 20px;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
  border-radius: 4px;
}

.navbar-nav a:hover {
  color: var(--content-bg);
  background-color: var(--primary);
}

.menu-toggle {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text);
  border-radius: 2px;
  position: absolute;
  transition: all 0.3s ease-in-out;
}

.hamburger::before {
  transform: translateY(-8px);
}

.hamburger::after {
  transform: translateY(8px);
}

/* Transform the hamburger into an 'X' when active */
.menu-toggle.active .hamburger {
  transform: rotate(45deg);
}

.menu-toggle.active .hamburger::before {
  transform: rotate(90deg) translateX(8px);
}

.menu-toggle.active .hamburger::after {
  transform: rotate(90deg) translateX(-8px);
}

/* Projects Section */
#projects {
  padding: 120px 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 15px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.project {
  background: var(--content-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  overflow: hidden;
  max-height: 70px;
  transition: max-height 0.5s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.project:hover {
  max-height: 1200px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.project-header {
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 0;
}

.project-content {
  display: flex;
  align-items: flex-start;
  padding: 0 20px 20px;
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
}

.project:hover .project-content {
  opacity: 1;
}

.project-image {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 30px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.3s ease 0.3s;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.project:hover .project-image {
  opacity: 1;
}

.project-text {
  flex: 1;
}

.project p {
  font-size: 1rem;
  color: var(--text-light);
  margin: 0 0 15px 0;
  line-height: 1.6;
}

.project-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--accent);
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.project-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(37, 99, 235, 0.1);
  transition: all 0.3s ease;
  z-index: -1;
}

.project-link i {
  margin-right: 8px;
}

.project-link:hover {
  color: var(--content-bg);
  transform: translateY(-2px);
}

.project-link:hover::before {
  left: 0;
  background: var(--accent);
}

/* ============================ */
/* MOBILE RESPONSIVENESS    */
/* ============================ */
@media (max-width: 768px) {
  /* Hide navbar links and show hamburger menu */
  .navbar .container {
    justify-content: space-between;
    flex-direction: row;
    padding: 0 1rem;
  }

  .navbar-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: var(--content-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: center; /* This centers the links horizontally */
    padding-bottom: 1rem;
    transition: transform 0.3s ease-in-out;
    transform: translateY(-100%);
  }

  .navbar-nav.active {
    display: flex;
    transform: translateY(0);
  }

  .navbar-nav a {
    width: 100%; /* Make links full width to ensure centering */
    text-align: center; /* Centers the text within the full-width link */
    padding: 0.5rem 0;
  }

  .menu-toggle {
    display: block; /* Show the toggle button on mobile */
  }

  /* Existing project section adjustments for mobile */
  .project-content {
    flex-direction: column;
  }
  .project-image {
    width: 100%;
    height: 250px;
    margin-right: 0;
    margin-bottom: 20px;
  }
  .section-title {
    font-size: 2.2rem;
  }
  .section-subtitle {
    font-size: 1.1rem;
  }
}