* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  padding-top: 100px;
  background:
    radial-gradient(circle at 20% 40%, rgba(60, 231, 255, 0.15), transparent 60%),
    radial-gradient(circle at 80% 60%, rgba(124, 58, 237, 0.12), transparent 70%),
    #050B18;
  color: white;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.top h1 {
  background: linear-gradient(90deg, #3CE7FF, #A367FF);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.top p {
  font-size: 16px;
  margin-bottom: 30px;
}

.container {
  width: 100%;
  max-width: 950px;
  margin: 0 auto 150px; 
  display: flex;
  flex: 1; 
  flex-direction: column;
  gap: 26px;
}

.project-card,
.p1,
.p2,
.p3,
.p4,
.p5,
.p6 {
  height: 35vh;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 22px;
  padding-left: 50px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  will-change: opacity, transform;
}

.project-card.visible,
.p1.visible,
.p2.visible,
.p3.visible,
.p4.visible,
.p5.visible,
.p6.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card::before,
.p1::before,
.p2::before,
.p3::before,
.p4::before,
.p5::before,
.p6::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: linear-gradient(to bottom, #3CE7FF, #A367FF);

}

.project-card.visible:hover,
.p1.visible:hover,
.p2.visible:hover,
.p3.visible:hover,
.p4.visible:hover,
.p5.visible:hover,
.p6.visible:hover {
  border-color: rgba(60, 231, 255, .35);
  box-shadow: 0 16px 32px rgba(60, 231, 255, .14);
  transform: translateY(-6px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title h1 {
  font-size: 24px;
}

.title img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.title-icons {
  display: flex;
  gap: 10px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(60, 231, 255, .10);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: .25s ease;

}

.icon-btn:hover {
  transform: translateY(-3px) scale(1.03);
  background: rgba(60, 231, 255, .18);
  border-color: rgba(60, 231, 255, .55);
  box-shadow: 0 0 14px rgba(60, 231, 255, .35);
  cursor: pointer;
}

.icon-btn img {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 0 4px rgba(60, 231, 255, .35));
}

.description {
  margin-top: 15px;
  margin-bottom: 15px;
  color: #aeb8cc;
  font-size: 16px;
  line-height: 1.5;
}

.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech p {
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  font-weight: 500;
  font-size: 14px;
}

.comingsoon {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.comingsoon h2 {
  color: white;
  font-weight: 400;
  font-size: 20px;
}

.comingsoon img {
  width: 18px;
}

.upcoming {
  border: 2px dashed rgba(168, 85, 247, .35);
  background: rgba(139, 92, 246, .05);
  border-radius: 18px;
  padding: 20px;
}

.dev {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.dev img:hover {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.dev img {
  width: 20px;
  animation: spin 1s linear infinite;
}


.dev h2 {
  font-size: 14px;
  font-weight: 400;
  color: #9966cc;
}

.upcoming .description p {
  color: #aeb8cc;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 30px;
}

.upcoming .description h2 {
  color: white;
  font-size: 20px;
  margin-bottom: 10px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badges p {
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  font-weight: 500;
  font-size: 14px;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn span {
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.icon-btn:hover span {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.github {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.github button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  padding: 12px 22px;
  border-radius: 12px;
  background: linear-gradient(90deg, #3CE7FF, #A367FF);
  color: #000;
  font-weight: 600;
}

.github img {
  width: 20px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 24, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(12px);
  padding: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
  position: relative;
  background: rgba(11, 18, 35, 0.95);
  padding: 5px;
  border-radius: 20px;
  border: 1px solid rgba(60, 231, 255, 0.3);
  width: 100%;
  max-width: 850px;
  box-shadow: 0 25px 50px -12px rgba(60, 231, 255, 0.25);
  transform: scale(0.9);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal video {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

.close {
  position: absolute;
  top: -45px;
  right: 0;
  font-size: 32px;
  cursor: pointer;
  color: #fff;
  transition: all 0.3s ease;
  z-index: 10001;
}

.close:hover {
  color: #3CE7FF;
  transform: scale(1.1);
}

/* Page entrance - top header */
.top {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-ready .top {
  opacity: 1;
  transform: translateY(0);
}

/* GitHub section entrance on scroll */
.github {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.github.visible {
  opacity: 1;
  transform: translateY(0);
}

.github button {
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.github button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(60, 231, 255, 0.35);
  filter: brightness(1.08);
}


footer {
  width: 100%;
  height: 60px;
  margin-top: auto;
  background:
    radial-gradient(circle at 20% 40%, rgba(60, 231, 255, 0.15), transparent 60%),
    radial-gradient(circle at 80% 60%, rgba(124, 58, 237, 0.12), transparent 70%),
    #050B18;
  display: flex;
  opacity: 1; /* Ensure visible without animation */
  transform: none;
  justify-content: center;
  align-items: center;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}


@media (max-width: 1024px) {

  body {
    padding-top: 90px;
  }

  .container {
    max-width: 820px;
    gap: 22px;
  }

  .project-card,
  .p1,
  .p2,
  .p3,
  .p4,
  .p5,
  .p6 {
    height: auto;
  }
}

@media (max-width: 900px) {

  .container {
    max-width: 720px;
    padding: 0 16px;
  }

  .project-card,
  .p1,
  .p2,
  .p3,
  .p4,
  .p5,
  .p6 {
    padding: 18px;
    padding-left: 40px;
  }

  .title h1 {
    font-size: 20px;
  }

  .description {
    font-size: 15px;
  }
}


/* =========================
   MOBILE (<= 650px)
========================= */
@media (max-width: 650px) {

  body {
    padding-top: 80px;
  }

  .top p {
    text-align: center;
  }

  .container {
    gap: 18px;
    padding: 0 14px;
  }

  .project-card,
  .p1,
  .p2,
  .p3,
  .p4,
  .p5,
  .p6 {
    height: auto;
    padding: 16px;
    padding-left: 32px;
  }

  .title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .title h1 {
    font-size: 18px;
  }

  .title-icons {
    align-self: flex-end;
  }

  .tech p,
  .badges p {
    font-size: 12px;
    padding: 5px 8px;
  }

  .upcoming .description p {
    font-size: 14px;
  }

  .github button {
    width: 100%;
    justify-content: center;
  }
}


/* =========================
   SMALL MOBILE (<= 430px)
========================= */
@media (max-width: 430px) {

  .title h1 {
    font-size: 17px;
  }

  .description {
    font-size: 14px;
  }

  .project-card,
  .p1,
  .p2,
  .p3,
  .p4,
  .p5,
  .p6 {
    padding: 14px;
    padding-left: 26px;
  }

  .upcoming {
    padding: 14px;
  }

  .comingsoon h2 {
    font-size: 16px;
  }

  .modal-content {
    width: 94%;
  }
}