  body {
      background: #0b0c10;
      color: #e5e7eb;
      font-family: 'Montserrat', sans-serif;
    }

    header h1 {
      text-align: center;
      padding: 2rem;
      font-size: 2.5rem;
    }

    .center {
      text-align: center;
    }

.back-button {
  display: inline-block;
  margin: 1rem auto;
  padding: 0.75rem 2rem;
  background-color: transparent;
  color: #e5e7eb;
  border: 2px solid #e5e7eb;
  border-radius: 30px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.back-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%; /* start off-screen left */
  width: 200%; /* big enough to sweep fully */
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(0, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: skewX(-25deg);
  opacity: 0;
  pointer-events: none;
  border-radius: inherit;
  transition: left 0.6s ease, opacity 0.3s ease; /* important for smooth return */
}

.back-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.back-button:hover::before {
  opacity: 1;
  left: 100%; /* move across */
}

    .projects1-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* Default: 1 column (phones) */
  gap: 2rem;
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: auto;
}

/* Tablets (e.g. iPads) */
@media (min-width: 768px) {
  .projects1-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktops */
@media (min-width: 1024px) {
  .projects1-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
h1 {
  text-align: center;
}

.projects1 {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: color-mix(in oklab, #0b0c10 92%, #1f2937); /* matches dark index card */
  border-radius: 18px; /* same as --radius in index */
  border: 1px solid #1f2937; /* same as --line in dark mode */
  box-shadow: 0 12px 40px rgba(0,0,0,.35); /* same as --shadow in dark mode */
  cursor: pointer;

  /* reveal animation */
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  will-change: transform, opacity;
  transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.3s ease;
}

.projects1.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1);
}

.projects1::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    0deg,
    transparent,
    transparent 30%,
    rgba(0,255,255,0.25)
  );
  transform: rotate(-45deg);
  transition: all 0.5s ease;
  opacity: 0;
  pointer-events: none;
  border-radius: inherit;
}

.projects1:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 20px rgba(0,255,255,0.4);
  border-color: rgba(0,255,255,0.4);
}

.projects1:hover::before {
  opacity: 1;
  transform: rotate(-45deg) translateY(100%);
}

.projects1 img {
  width: 100%;
  height: auto;
  border-radius: 18px; /* match the card’s inner image rounding */
  margin-bottom: 0.5rem;
}

    footer {
      text-align: center;
      padding: 2rem;
      color: #999;
    }

    /* Lightbox */
    .lightbox {
      display: none;
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      justify-content: center;
      backdrop-filter: blur(10px);
      align-items: center;
      z-index: 999;
      flex-direction: column;
      padding: 1rem;
    }

    .lightbox img {
      max-width: 90%;
      max-height: 80vh;
      border-radius: 10px;
    }

    .lightbox p {
      margin-top: 1rem;
      color: #ccc;
      text-align: center;
    }

    .lightbox .close {
      position: absolute;
      top: 20px;
      right: 30px;
      font-size: 2rem;
      color: #fff;
      cursor: pointer;
    }

    h4 {
  text-align: center;
  font-size: 2.5rem;
  color: #0a0a0a;
}
.language-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 50px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.2s;
}

.language-toggle:hover {
  background-color: #e0e0e0;
}
  .progress{position:fixed; inset:0 0 auto 0; height:3px; background:linear-gradient(90deg, #000, #6b7280); transform-origin:0 50%; transform:scaleX(0); z-index:9999}

footer {
  padding: 56px 20px; /* vertical and horizontal padding */
}

footer .foot {
  max-width: 1155px; /* content won’t stretch too wide */
  margin: 0 auto;    /* centers the content */
  display: flex;
  align-items: center;
  justify-content: space-between; /* big space between items */
  flex-wrap: wrap;
  color: var(--muted);
  font: 400 16px / 1.6 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.foot a {
  color: inherit;
  text-decoration: none;
  font: 400 16px / 1.6 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.container{max-width:var(--container); margin:0 auto; padding:0 20px}

.to-top{position:fixed; right:20px; bottom:20px; border:1px solid var(--line); border-radius:999px; padding:.7rem .9rem; background:color-mix(in oklab, var(--bg) 90%, var(--line));
      box-shadow:var(--shadow); opacity:0; transform:translateY(10px); pointer-events:none; transition:opacity .25s var(--easing), transform .25s var(--easing);}
    .to-top.visible{opacity:1; transform:none; pointer-events:auto}