/* ===== GLOBAL ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 52px;
}

body {
  background: #0f172a;
  color: #f1f5f9;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  margin: 0;
  padding-top: 70px;
}

/* ===== TOPBAR (Back Button Only) ===== */
.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1e293b;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  z-index: 100;
}

/* Back Button */
.back-btn {
  background: #38bdf8;
  color: white !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
}

/* ===== HEADER ===== */
.alproject {
  text-align: center;
  margin-top: 40px;
  font-size: 2rem;
  color: #38bdf8;
  font-weight: 600;
  text-transform: uppercase;
}

/* ===== PROJECT SECTION ===== */
section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

section h2 {
  color: #38bdf8;
  font-size: 1.5rem;
  margin: 40px 0 10px 0;
}

/* ===== PROJECT CARD ===== */
.project-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  background: #192130;
  border-radius: 18px;
  padding: 30px;
  width: 80%;
  max-width: 1100px;
  margin-bottom: 50px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
}

.project-card p {
  flex: 1 1 400px;
  line-height: 1.7;
  font-size: 15px;
  margin: 0 20px 10px 0; /* smaller bottom margin */
  padding-left: 0;
}

.project-card img {
  flex: 1 1 320px;
  border-radius: 12px;
  object-fit: cover;
  max-height: 350px;
  width: 100%;
  margin: 0; /* remove extra gap */
  display: block;
}

/* ===== TECHNOLOGY ===== */
.tech {
  display: inline-block;
  margin-top: 8px;
  color: #94a3b8;
  font-size: 14px;
}

/* ===== BUTTONS ===== */
.btn-group {
  width: 100%;
  text-align: center;
  margin-top: 10px; /* smaller gap */
}

.view-btn {
  display: inline-block;
  background: #38bdf8;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
}

p {
  padding-left: 0;
}

/* ===== RESPONSIVE ===== */

/* Tablet view */
@media screen and (max-width: 1024px) {
  .project-card {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 25px;
  }

  .project-card p {
    margin: 0 0 10px 0;
  }

  .project-card img {
    max-width: 100%;
    height: auto;
    margin: 0 0 10px 0;
  }

  .btn-group {
    margin-top: 10px;
  }
}

/* Mobile view */
@media screen and (max-width: 600px) {
  .alproject {
    font-size: 1.5rem;
    margin-top: 20px;
  }

  .project-card {
    width: 95%;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 20px;
  }

  .project-card p {
    font-size: 14px;
    margin: 0 0 10px 0;
    height: auto;
  }

  .project-card img {
    width: 100%;
    height: auto;
    margin: 0 0 10px 0;
  }

  .btn-group {
    margin-top: 10px;
  }

  section {
    padding: 20px 10px;
  }
}
