/* ===== Base ===== */
body {
  margin: 0;
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  align-items: center;

  background-color: #121212;
  color: #ffffff;

  font-family: "Zalando Sans Expanded", Arial, sans-serif;
  font-weight: 900;

  user-select: none;
}

/* ===== Title ===== */
h2 {
  margin-top: 80px;
  margin-bottom: 20px;

  font-size: min(4rem, 8vw);

  background: linear-gradient(
    90deg,
    #ffd166,
    #ff9f1c,
    #ff6b00
  );

  background-size: 200% 200%;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: gradientMove 3s ease infinite;
}

/* ===== Search Bar ===== */
#searchBar {
  width: min(90%, 420px);
  padding: 12px 16px;
  margin-bottom: 14px;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;

  color: white;
  font-family: inherit;
  font-weight: 900;
  font-size: 1rem;

  backdrop-filter: blur(8px);
}

#searchBar::placeholder {
  opacity: 0.5;
  color: white;
}

/* ===== Tag Filters ===== */
/* ===== Tag Capsules ===== */
#tagFilters {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* capsule button */
.tag-capsule {
  padding: 8px 14px;
  border-radius: 999px;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);

  cursor: pointer;
  transition: all 0.25s ease;

  font-size: 0.9rem;
}

/* active filter */
.tag-capsule.active {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
}

/* hover */
.tag-capsule:hover {
  background: rgba(255,255,255,0.14);
}

/* ===== Featured capsule ===== */
.tag-capsule.featured {
  background: rgba(255, 200, 0, 0.15);
  border-color: rgba(255, 200, 0, 0.4);
  color: #ffd966;
}

.tag-capsule.featured::before {
  content: "⭐ ";
}

/* ===== Tags INSIDE cards ===== */
.card .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;

  /* ===== CLIPPING ZONE ===== */
  max-height: 72px;        /* ~2 lines of tags */
  overflow: hidden;

  position: relative;
}

/* fade hint when clipped */
.card .tag-list::after {
  content: "";
  position: absolute;

  bottom: 0;
  left: 0;
  right: 0;

  height: 22px;

  pointer-events: none;
}

.card .tag {
  padding: 4px 10px;
  border-radius: 999px;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);

  font-size: 0.75rem;
  opacity: 0.9;
}

/* featured tag inside card */
.card .tag.featured {
  background: rgba(255, 200, 0, 0.18);
  border-color: rgba(255, 200, 0, 0.5);
  color: #ffd966;
}

.card .tag.featured::before {
  content: "⭐ ";
}



#tagFilters label {
  background: rgba(255,255,255,0.05);
  padding: 6px 12px;
  border-radius: 10px;

  cursor: pointer;
  transition: all 0.25s ease;
}

#tagFilters label:hover {
  background: rgba(255,255,255,0.12);
}

#tagFilters input {
  margin-right: 6px;
}

/* ===== Card Grid ===== */
.container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;

  width: min(95%, 1100px);
  margin-bottom: 60px;
}

/* ===== Project Card ===== */
.card {
  /* ===== FIXED SIZE ===== */
  width: 260px;
  height: 380px;

  display: flex;
  flex-direction: column;

  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);

  padding: 12px;
  border-radius: 16px;

  cursor: pointer;
  transition: all 0.3s ease;

  box-shadow: 0 0 30px rgba(255, 157, 0, 0.08);
  border: 1px solid rgba(255,255,255,0.08);
}


.card:hover {
  transform: translateY(-4px) scale(1.02);

  box-shadow: 0 0 40px rgba(255, 157, 0, 0.22);
  border-color: rgba(255, 157, 0, 0.3);
}

/* Square cover */
.card img {
  width: 100%;     /* FIXED HEIGHT */
  aspect-ratio: 1 / 1;
  object-fit: cover;

  border-radius: 12px;
  margin-bottom: 8px;

  flex-shrink: 0;
}

.card > div:nth-child(2) {
  font-size: 1.05rem;
  margin-bottom: 6px;

  /* prevent giant titles from killing space */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  overflow: hidden;
  min-height: 2.4em;
  flex-shrink: 0;
}


/* Title */
.card div:nth-child(2) {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

/* Tags text */
.tags {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ===== Animations ===== */

@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes smoothHoverGradient {
  0%   { background-position: 0% 50%; }
  20%  { background-position: 100% 50%; }
  40%  { background-position: 0% 50%; }
  60%  { background-position: 100% 50%; }
  80%  { background-position: 0% 50%; }
  100% { background-position: 50% 50%; }
}

header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background-color: #1a1a1a; /* dark header strip */
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: "Zalando Sans Expanded", Arial, sans-serif;
}

/* Navigation menu */
header nav {
  display: flex;
  gap: 20px;
}

/* Header links/buttons */
header nav a {
  text-decoration: none;
  color: white;
  font-weight: 900;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: min(1.2rem, 2.5vw);
}

/* Hover gradient effect on nav links */
header nav a:hover {
  background: linear-gradient(90deg, #ffd166, #ff9f1c, #ff6b00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: smoothHoverGradient 2s forwards;
}

/* Optional: Adjust h1 margin to compensate for sticky header */
h1 {
  margin-top: 80px; /* adds space below sticky header */
}