/* ========== Base & Variables ========== */
:root {
  --bg-color: #1f242d;
  --second-bg-color: #323946;
  --text-color: #ffffff;
  --muted: #b5b9c2;
  --main-color: #0ef;
  --accent-dark: #0ab;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  color: inherit;
  outline: none;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
}

/* ========== Header ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(31, 36, 45, 0.95);
  backdrop-filter: blur(6px);
}

.logo {
  font-size: 2.5rem;
  font-weight: 600;
  cursor: default;
  color: var(--text-color);
}

#menu-icon {
  font-size: 3.6rem;
  color: var(--text-color);
  display: none;
  cursor: pointer;
}

.navbar a {
  font-size: 1.7rem;
  margin-left: 3.5rem;
  color: var(--muted);
  position: relative;
  transition: 0.3s;
  padding: 0.2rem 0;
}

.navbar a.active,
.navbar a:hover {
  color: var(--main-color);
}

/* underline animation */
.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--main-color), var(--accent-dark));
  transition: 0.35s;
  border-radius: 2px;
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}

/* sticky header small border */
.header.sticky {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ========== Sections ========== */
section {
  min-height: 100vh;
  padding: 10rem 9% 4rem;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.heading {
  font-size: 4.5rem;
  text-align: center;
  margin-bottom: 3.2rem;
}

span {
  color: var(--main-color);
}

/* ========== Home ========== */
.home {
  justify-content: space-between;
}

.home-content {
  max-width: 55rem;
}

.home-content h3 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.home-content h1 {
  font-size: 5.6rem;
  margin: 0.4rem 0 1rem;
  line-height: 1.05;
}

.home-content p {
  font-size: 1.6rem;
  color: var(--muted);
  margin: 1.6rem 0;
}

/* Actions (primary + outline) */
.actions {
  display: flex;
  gap: 1.4rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.6rem;
  border-radius: 4rem;
  font-weight: 600;
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  z-index: 0;
  transition: transform 0.6s ease;
  transform: translateX(-110%);
}

.btn:hover::before {
  transform: translateX(0);
}

/* Primary */
.btn-primary {
  background: linear-gradient(90deg, var(--main-color), var(--accent-dark));
  color: #091018;
  z-index: 1;
  box-shadow: 0 8px 40px rgba(14,239,255,0.09);
}

.btn-primary:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 20px 80px rgba(14,239,255,0.12);
}

/* Outline */
.btn-outline {
  background: transparent;
  border: 0.18rem solid rgba(14,239,255,0.12);
  color: var(--main-color);
  z-index: 1;
}

.btn-outline:hover {
  background: rgba(14,239,255,0.06);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(14,239,255,0.06);
}

/* pulse subtle on primary (not aggressive) */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(14,239,255,0.08);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(14,239,255,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14,239,255,0);
  }
}

.btn-primary {
  animation: pulse 4.5s infinite;
  animation-delay: 1s;
}

/* social icons */
.social-media {
  margin-top: 2.6rem;
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.social-media a {
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0.2rem solid rgba(14,239,255,0.14);
  color: var(--main-color);
  font-size: 2rem;
  transition: 0.3s;
  background: transparent;
}

.social-media a:hover {
  background: var(--main-color);
  color: var(--second-bg-color);
  transform: translateY(-6px) scale(1.08);
  box-shadow: 0 10px 40px rgba(14,239,255,0.12);
}

/* home image float */
.home-img img {
  width: 35vw;
  animation: floatImage 4s ease-in-out infinite;
  display: block;
  border-radius: 1.2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

@keyframes floatImage {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2.4rem);
  }
  100% {
    transform: translateY(0);
  }
}

/* ========== About ========== */
.about {
  gap: 3.5rem;
  background: var(--second-bg-color);
  padding: 8rem 9% 6rem;
  border-radius: 1.2rem;
}

.about-img img {
  width: 35vw;
  border-radius: 1rem;
}

.about-content h3 {
  font-size: 2.6rem;
  margin-top: 1rem;
}

.about-content p {
  color: var(--muted);
  font-size: 1.6rem;
  margin: 1.6rem 0 2.4rem;
}

/* ========== Services ========== */
.services-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.services-box {
  flex: 1 1 30rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  padding: 3rem 2rem;
  border-radius: 1.6rem;
  text-align: center;
  border: 0.2rem solid rgba(0,0,0,0.12);
  transition: 0.4s;
}

.services-box:hover {
  transform: translateY(-10px);
  border-color: rgba(14,239,255,0.18);
  box-shadow: 0 30px 80px rgba(2,8,23,0.6);
}

.services-box i {
  font-size: 6.8rem;
  color: var(--main-color);
  margin-bottom: 1.2rem;
}

.services-box h3 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.services-box p {
  color: var(--muted);
}

/* ========== Portfolio ========== */
.portfolio {
  background: linear-gradient(180deg, var(--second-bg-color), rgba(50,57,70,0.95));
  padding-bottom: 6rem;
}

.portfolio-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.portfolio-box {
  position: relative;
  border-radius: 1.6rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s;
  background: #111418;
}

.portfolio-box img {
  width: 100%;
  transition: transform 0.6s ease;
  display: block;
}

.portfolio-box:hover img {
  transform: scale(1.08);
}

.portfolio-layer {
   position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.6rem;
  transform: translateY(100%);
  transition: 0.45s ease;
  background: rgba(0, 0, 0, 0.75); /* কালো সেমি-ট্রান্সপারেন্ট ব্যাকগ্রাউন্ড */
  color: #fff; /* সাদা টেক্সট */
  opacity: 0; /* শুরুতে লুকানো থাকবে */
}

.portfolio-box:hover .portfolio-layer {
  transform: translateY(0);
  opacity: 1;
}

.portfolio-layer h4 {
  font-size: 2.8rem;
  color: var(--text-color);
  margin-bottom: 0.6rem;
}

.portfolio-layer p {
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 1.4rem;
  padding: 0.8rem;
  border-radius: 0.6rem;
  margin-bottom: 1rem;
  width: 100%;
}

.portfolio-layer a {
  display: inline-flex;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--text-color);
}

.portfolio-layer a i {
  color: var(--second-bg-color);
  font-size: 2rem;
}

/* ========== Contact ========== */
.contact {
  flex-direction: column;
  background: var(--bg-color);
  padding-bottom: 6rem;
}

.contact form {
  width: 100%;
  max-width: 70rem;
  margin: 1rem auto;
  text-align: center;
}

.contact .input-box {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.contact input[type="text"],
.contact input[type="email"],
.contact input[type="tel"],
.contact textarea {
  width: 100%;
  padding: 1.5rem;
  border-radius: 0.8rem;
  background: var(--second-bg-color);
  color: var(--text-color);
  font-size: 1.6rem;
  border: 1px solid rgba(255,255,255,0.03);
}

.contact .input-box input {
  width: 49%;
}

.contact textarea {
  resize: none;
  margin-top: 0.6rem;
}

/* ========== Footer ========== */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 2rem 9%;
  background: var(--second-bg-color);
  margin-top: 4rem;
}

.footer-text p {
  color: var(--muted);
  font-size: 1.4rem;
}

.footer-iconTop a {
  display: inline-flex;
  padding: 0.8rem;
  border-radius: 0.8rem;
  background: var(--main-color);
  transition: 0.3s;
}

.footer-iconTop a i {
  color: var(--second-bg-color);
  font-size: 2.4rem;
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
  html {
    font-size: 55%;
  }
}

@media (max-width: 991px) {
  .header {
    padding: 2rem 3%;
  }
  section {
    padding: 10rem 3% 3rem;
  }
  .portfolio-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }
  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1.4rem 3%;
    background: var(--bg-color);
    display: none;
    border-top: 1px solid rgba(0,0,0,0.12);
  }
  .navbar.active {
    display: block;
  }
  .navbar a {
    display: block;
    margin: 1.6rem 0;
    font-size: 2rem;
  }
  .home {
    flex-direction: column;
  }
  .home-img img,
  .about-img img {
    width: 70vw;
    margin-top: 2rem;
  }
}

@media (max-width: 617px) {
  .portfolio-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 450px) {
  .contact .input-box input {
    width: 100%;
  }
}

@media (max-width: 365px) {
  html {
    font-size: 50%;
  }
  .footer {
    flex-direction: column-reverse;
  }
}
/* ========== Filter button ========== */
/* Filter Buttons */
.portfolio-filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: .6rem 1.2rem;
  border-radius: 2rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-color, #fff);
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
}

.filter-btn:hover {
  background: var(--main-color);
  color: #000;
}

.filter-btn.active {
  background: var(--main-color);
  color: #000;
  border-color: var(--main-color);
}

/* Portfolio Item Animation */
.portfolio-box {
  transition: transform .3s ease, opacity .3s ease;
}

.portfolio-box.hide-anim {
  transform: scale(0.9);
  opacity: 0;
}

.portfolio-box.show-anim {
  transform: scale(1);
  opacity: 1;
}

.portfolio-actions {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn.small {
  color: white;                  /* White text */
  background-color: #0ef;        /* Bright cyan button */
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-size: 1.4rem;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn.small:hover {
  background-color: #08c;        /* Darker blue on hover */
  color: #fff;
}

.btn.small.outline {
  background: transparent;
  border: 2px solid #0ef;
  color: #0ef;                   /* Cyan text */
}

.btn.small.outline:hover {
  background-color: #0ef;
  color: #091018;                /* Dark text on hover */
}
