* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #050505;
  --card: rgba(14, 14, 14, 0.82);
  --white: #ffffff;
  --muted: #a0a0a0;
  --purple: #9d4edd;
}

html,
body {
  width: 100%;
  min-height: 100%;
  height: 100%;
}

body {
  font-family: "Inter", sans-serif;

  background:
    radial-gradient(
      circle at top,
      #161616 0%,
      #070707 50%,
      #000 100%
    );

  background-attachment: fixed;

  color: white;

  overflow-x: hidden;
  overflow-y: auto;

  padding: 40px 16px;

  opacity: 0;

  animation:
    pageFadeIn 0.6s ease forwards;
}

.bg {
  position: fixed;
  inset: 0;

  width: 100%;
  height: 100%;
}

.grid {
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(
      rgba(255,255,255,0.03) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,0.03) 1px,
      transparent 1px
    );

  background-size: 45px 45px;

  opacity: 0.6;

  transform: translateZ(0);
}

.orb {
  position: absolute;

  filter: blur(90px);

  opacity: 0.25;

  border-radius: 50%;
}

.orb.one {
  width: 300px;
  height: 300px;

  background: var(--purple);

  top: -100px;
  left: -80px;
}

.orb.two {
  width: 260px;
  height: 260px;

  background: white;

  bottom: -120px;
  right: -90px;
}

.top {
  text-align: center;

  padding: 80px 20px 40px;

  opacity: 0;

  transform: translateY(-20px);

  animation:
    slideInTop 0.7s ease forwards;

  animation-delay: 0.1s;
}

.top h1 {
  font-size: 2.6rem;

  letter-spacing: -1px;
}

.top p {
  margin-top: 10px;

  color: var(--muted);

  font-size: 0.95rem;
}

.container {
  width: min(1000px, 92vw);

  margin: 0 auto;

  display: grid;

  gap: 20px;

  padding-bottom: 80px;
}

.project {
  opacity: 0;

  transform: translateY(18px);

  animation:
    cardIn 0.6s ease forwards;

  background:
    rgba(18,18,18,0.75);

  border:
    1px solid rgba(255,255,255,0.06);

  border-radius: 20px;

  overflow: hidden;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease;
}

.project:hover {
  transform: translateY(-4px);

  border-color:
    rgba(157,78,221,0.35);

  box-shadow:
    0 12px 40px rgba(0,0,0,0.28),
    0 0 25px rgba(157,78,221,0.12);
}

.project:nth-of-type(1) {
  animation-delay: 0.15s;
}

.project:nth-of-type(2) {
  animation-delay: 0.25s;
}

.project:nth-of-type(3) {
  animation-delay: 0.35s;
}

.project:nth-of-type(4) {
  animation-delay: 0.45s;
}

.project-link {
  display: block;

  text-decoration: none;
}

.banner {
  width: 100%;
  height: 180px;

  overflow: hidden;

  background: #0b0b0b;
}

.banner img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  filter:
    contrast(1.05)
    saturate(1.05);

  transition:
    transform 0.4s ease;
}

.project:hover .banner img {
  transform: scale(1.05);
}

.content {
  padding: 18px 18px 16px;
}

.content h2 {
  font-size: 1.2rem;
}

.content p {
  margin-top: 6px;

  font-size: 0.9rem;

  color: var(--muted);

  line-height: 1.4;
}

.tags {
  margin-top: 12px;

  display: flex;

  gap: 8px;

  flex-wrap: wrap;
}

.tags span {
  font-size: 0.75rem;

  padding: 4px 10px;

  border-radius: 999px;

  background:
    rgba(157,78,221,0.12);

  border:
    1px solid rgba(157,78,221,0.25);

  color: #d9b3ff;
}

.project-buttons {
  display: flex;

  gap: 12px;

  margin-top: 18px;
}

.project-btn {
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px 14px;

  border-radius: 14px;

  text-decoration: none;

  font-size: 0.88rem;
  font-weight: 600;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.project-btn:hover {
  transform: translateY(-2px);
}

.project-btn.primary {
  color: white;

  background:
    linear-gradient(
      180deg,
      rgba(157,78,221,0.24),
      rgba(157,78,221,0.12)
    );

  border:
    1px solid rgba(157,78,221,0.35);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.project-btn.primary:hover {
  border-color:
    rgba(157,78,221,0.55);

  box-shadow:
    0 0 25px rgba(157,78,221,0.22);
}

.project-btn.secondary {
  color: #d0d0d0;

  background:
    rgba(255,255,255,0.04);

  border:
    1px solid rgba(255,255,255,0.08);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.project-btn.secondary:hover {
  color: white;

  border-color:
    rgba(157,78,221,0.3);

  box-shadow:
    0 0 20px rgba(157,78,221,0.14);
}

.project-btn i {
  font-size: 0.9rem;
}

.back-btn {
  position: fixed;

  top: 18px;
  left: 18px;

  padding: 8px 12px;

  font-size: 0.9rem;

  color: rgba(255,255,255,0.7);

  text-decoration: none;

  border-radius: 10px;

  background:
    rgba(18,18,18,0.55);

  border:
    1px solid rgba(255,255,255,0.08);

  backdrop-filter: blur(12px);

  transition: 0.2s ease;

  z-index: 1000;
}

.back-btn:hover {
  color: white;

  transform: translateX(-2px);

  border-color:
    rgba(157,78,221,0.35);

  box-shadow:
    0 0 20px rgba(157,78,221,0.15);
}

#transition {
  position: fixed;
  inset: 0;

  background: black;

  opacity: 0;

  pointer-events: none;

  z-index: 99999;

  transition: opacity 0.5s ease;
}

#transition.active {
  opacity: 1;
}

@keyframes pageFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideInTop {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {

  body {
    padding: 20px 12px;
  }

  .banner {
    height: 140px;
  }

  .top h1 {
    font-size: 2.1rem;
  }

  .project-buttons {
    flex-direction: column;
  }

}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

body::-webkit-scrollbar-thumb {
  background: rgba(157, 78, 221, 0.35);
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,0.2);
}

body::-webkit-scrollbar-thumb:hover {
  background: rgba(157, 78, 221, 0.55);
}

body {
  scrollbar-width: thin;
  scrollbar-color: rgba(157,78,221,0.35) rgba(255,255,255,0.02);
}
