@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  --gap: 1rem;
  --card-padding: 1.25rem;
  --card-radius: 1rem;
  --font: "Space Grotesk", "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --logo-size: 60px;

  --brand: #ec4899;
  --brand-strong: #db2777;
  --background: #fef2f8;
  --surface: #ffffff;
  --surface-alt: #fff5fb;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-gradient-top: rgba(255, 255, 255, 0.35);
  --card-gradient-bottom: rgba(255, 255, 255, 0.85);
  --card-shadow: 0 20px 40px rgba(236, 72, 153, 0.12);
  --bucket-bg: rgba(255, 255, 255, 0.75);
  --bucket-shadow: 0 10px 30px rgba(236, 72, 153, 0.12);
  --text: #141022;
  --text-muted: #7c6b8f;
  --border: rgba(236, 72, 153, 0.2);
  --hover: rgba(236, 72, 153, 0.08);
  --shadow: 0 20px 60px rgba(236, 72, 153, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0f0a16;
    --surface: #1a1324;
    --surface-alt: #140f1c;
    --card-bg: rgba(13, 9, 20, 0.9);
    --card-gradient-top: rgba(15, 10, 22, 0.45);
    --card-gradient-bottom: rgba(15, 10, 22, 0.8);
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    --bucket-bg: rgba(18, 13, 25, 0.9);
    --bucket-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
    --text: #fdf5ff;
    --text-muted: #bfa8cf;
    --border: rgba(255, 255, 255, 0.08);
    --hover: rgba(236, 72, 153, 0.15);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font);
  background: radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.22), transparent 52%),
              radial-gradient(circle at 80% 0%, rgba(236, 72, 153, 0.15), transparent 45%),
              var(--background);
  color: var(--text);
  overflow-x: hidden;
}

main {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-bottom: 4rem;
  position: relative;
  z-index: 1;
}

body.models-page main {
  gap: 1.25rem;
}

.section-heading {
  padding: 0 clamp(1rem, 5vw, 6rem);
  margin: 2.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 760px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
}

.models-heading {
  gap: 0.75rem;
}

.models-heading .ghost-link {
  align-self: flex-start;
  padding: 0.15rem 0.35rem;
  border-radius: 0.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 6vw, 6rem);
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(20, 12, 24, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.4rem;
  color: var(--text);
}

.logo {
  width: var(--logo-size);
  height: var(--logo-size);
  transition: transform 0.3s ease;
  filter: drop-shadow(0 10px 20px rgba(236, 72, 153, 0.35));
}

.logo:hover {
  transform: translateY(-4px) rotate(-4deg);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: var(--brand-strong);
  margin: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ghost-link {
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 500;
  transition: background 0.2s ease;
}

.ghost-link:hover {
  background: var(--hover);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cta.primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-strong));
  color: #fff;
  box-shadow: var(--shadow);
}

.cta.secondary,
.cta.ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.cta:hover {
  transform: translateY(-2px);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  padding: 4rem clamp(1.25rem, 6vw, 6rem) 0;
  position: relative;
}

.hero-copy p {
  margin: 0 0 1.25rem;
  max-width: 520px;
  color: var(--text-muted);
}

.hero-copy h2 + p {
  margin-top: 1.25rem;
}

.hero-copy h2 {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.hero-stats li {
  min-width: 120px;
}

.stat {
  display: block;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--brand-strong);
}

.label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-panel {
  position: relative;
}

.hero-card {
  background: var(--surface);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.hero-card-copy {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.chip {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.card-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--brand-strong);
}

.scribble {
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  background: rgba(236, 72, 153, 0.2);
  border-radius: 35% 65% 55% 45% / 60% 40% 60% 40%;
  filter: blur(8px);
  animation: float 6s ease-in-out infinite alternate;
}

@keyframes float {
  to {
    transform: translateY(12px) rotate(6deg);
  }
}

.orb {
  position: fixed;
  width: 320px;
  height: 320px;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.orb-one {
  top: -80px;
  left: -60px;
  background: rgba(250, 107, 186, 0.8);
}

.orb-two {
  bottom: 0;
  right: -40px;
  background: rgba(219, 39, 119, 0.7);
}

/*─────────────────────────────── Grid Layout ───────────────────────────────*/
@media (min-width: 900px) {
  .grid {
    display: grid;
    gap: var(--gap);
    padding: 1rem 10rem;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  }

  .discord {
    padding: 2rem 10rem;
  }

  .section-heading {
    padding: 0 10rem;
  }
}

@media (max-width: 1000px) {
  .grid {
    display: grid;
    gap: 1rem;
    padding: 1rem;
  }

  .discord {
    padding: 1rem;
  }
}

/*────────────────────────────── Bucket Buttons ─────────────────────────────*/
.bucket {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 2.5rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 1.25rem;
  text-align: center;
  font-size: 1.25rem;
  background: var(--bucket-bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
  box-shadow: var(--bucket-shadow);
  text-decoration: none;
  color: inherit;
}

.bucket:hover {
  transform: translateY(-6px);
  border-color: rgba(236, 72, 153, 0.5);
  box-shadow: 0 15px 40px rgba(236, 72, 153, 0.2);
}

.grid.bucket-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.featured {
  background: var(--surface-alt);
  padding: 1rem 0 3rem;
  border-top: 1px solid var(--border);
}

.featured-grid {
  margin-top: 1rem;
}

/*─────────────────────────────── Model Cards ───────────────────────────────*/
.card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--gap);
  padding: var(--card-padding);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  transition: background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--card-shadow);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--card-bg-image, none);
  background-size: cover;
  background-position: center;
  filter: blur(236px) saturate(5);
  transform: scale(1.15);
  transform-origin: center;
  opacity: 0.3;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 55%,
    var(--card-gradient-top, rgba(255, 255, 255, 0.35)) 80%,
    var(--card-gradient-bottom, rgba(255, 255, 255, 0.85)) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.card > * {
  position: relative;
  z-index: 2;
}

.content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.desc {
  margin: 0;
  line-height: 1.4;
  flex-basis: 100%;
  color: var(--text-muted);
}

.thumb {
  width: 80px;
  height: 80px;
  aspect-ratio: 1 / 1;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(255, 255, 255, 0.6));
  transition: opacity 0.3s ease;
  opacity: 0;
}

.thumb[data-loaded="true"] {
  opacity: 1;
}

.name {
  font-size: 1.1rem;
  margin: 0;
}

.meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.repo {
  align-self: flex-start;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  margin-top: auto;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: transform 0.1s ease, background 0.1s ease;
  color: #fff;
  background: var(--brand);
  width: 8rem;
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.25);
}

.repo:hover {
  transform: translateY(-2px);
}

.talk,
.q4 {
  align-self: flex-start;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  margin-top: auto;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0px 0px 0px 2px var(--brand) inset;
  color: var(--brand);
  background: var(--background);
  width: 8rem;
}

.talk:hover,
.q4:hover {
  transform: translateY(-2px);
}

.repo,
.talk,
.q4 {
  display: flex;
  justify-content: center;
  align-items: center;
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.actions2 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.info {
  display: flex;
  justify-content: center;
  margin: 0 0 1rem 0;
  padding: 0;
}

.info a {
  color: var(--brand);
  text-decoration: none;
}

.discord {
  font-size: 1.1rem;
}

.discord a {
  color: var(--brand);
  text-decoration: none;
}

/* Tag chips -------------------------------------------------------------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.85rem;
  margin: 0;
  padding: 0 clamp(1rem, 6vw, 6rem);
}

.tags:empty {
  display: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid var(--brand);
  border-radius: 1.5rem;
  font-size: 0.9rem;
  color: var(--brand);
  user-select: none;
  line-height: 1.1rem;
  background: transparent;
  text-decoration: none;
}

button.tag {
  cursor: pointer;
  font: inherit;
  background: transparent;
}

button.tag:hover {
  background: var(--hover);
}

button.tag:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.tag:not(button):hover {
  background: var(--hover);
  cursor: default;
}

.tag.active {
  background: var(--brand);
  color: #fff;
}

.tags2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

@media (min-width: 900px) {
  .tags {
    padding: 0 10rem;
  }
}

.tag-line {
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-line .tag {
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
}

#bucket-title .count {
  color: var(--brand);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0 1rem 0;
}

.pagination a {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--brand);
  border-radius: 0.4rem;
  color: var(--brand);
  text-decoration: none;
  user-select: none;
  cursor: pointer;
}

.pagination a.active {
  background: var(--brand);
  color: #fff;
}

.pagination a.disabled {
  opacity: 0.4;
  pointer-events: none;
  border-color: var(--border);
}

footer {
  padding: var(--gap) 2rem;
  background: transparent;
  margin-top: auto;
}

footer .info {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--text-muted);
}

footer .info a {
  color: var(--brand-strong);
  text-decoration: none;
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
    position: relative;
  }

  .site-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-stats {
    gap: 1rem;
  }

  .section-heading {
    padding: 0 1.5rem;
  }

  .tags {
    margin: 0;
    padding: 0 1.5rem;
  }
}
