body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f4f4f4;
}

.top-bar {
    position: relative; /* make it the positioning context */
    background-color: #6a0dad;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-bar h1 {
    color: white;
    font-size: 2rem;
    margin: 0;
    letter-spacing: 1px;
}

.projects-section {
    padding: 40px 20px;
}

.projects-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.projects-container h2 {
    font-size: 1.8rem;
    color: #333;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 0 auto;
    text-align: center;
}

.project-card {
    position: relative;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    aspect-ratio: 1 / 0.6;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; /* 👈 ensures crop happens from bottom */
    z-index: 0;
}

.project-name {
    position: relative;
    z-index: 1;
    background-color: white;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    box-sizing: border-box;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Hamburger menu button */
#menu-toggle {
  font-size: 1.8rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001; /* on top of everything */
}

/* Positioning and style for side menu */
.side-menu {
  position: fixed;
  top: 0;
  left: -250px; /* hide off screen */
  width: 250px;
  height: 100%;
  background-color: #6a0dad;
  box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  padding: 100px 20px 20px 20px; /* leave space for top bar */
  box-sizing: border-box;
  transition: left 0.3s ease;
  z-index: 1000;
}

.side-menu.open {
  left: 0; /* slide in */
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-menu li + li {
  margin-top: 20px;
}

.side-menu a {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  display: block;
  transition: color 0.2s ease;
}

.side-menu a:hover,
.side-menu a:focus {
  color: #d6a6ff;
  outline: none;
}

/* Overlay that fades out the page content */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 900;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
  cursor: pointer;
}
