@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --bg-color: #060606;
  --blob-1: #ff2a5f;
  --blob-2: #007aff;
  --blob-3: #ff9500;
  --blob-opacity: 0.35;

  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-shadow: rgba(0, 0, 0, 0.3);
  --glass-highlight: rgba(255, 255, 255, 0.65);
  --glass-caustic: rgba(255, 255, 255, 0.18);
  --reflection-start: rgba(255, 255, 255, 0.5);
  --reflection-end: rgba(255, 255, 255, 0);
  --glare-color: rgba(255, 255, 255, 0.35);

  --pill-bg: rgba(255, 255, 255, 0.72);
  --pill-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  --icon-color: rgba(255, 255, 255, 0.65);
  --icon-active: rgba(0, 0, 0, 0.95);
  --divider: rgba(255, 255, 255, 0.22);
  --card-bg: #131315;
  --card-shell: rgba(255, 255, 255, 0.12);
  --text-color: #ffffff;
}

[data-theme="dark"] {
  --bg-color: #000000;
  --blob-1: #bf5af2;
  --blob-2: #0a84ff;
  --blob-3: #ff375f;
  --blob-opacity: 0.28;

  --glass-bg: rgba(30, 30, 35, 0.45);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shadow: rgba(0, 0, 0, 0.8);
  --glass-highlight: rgba(255, 255, 255, 0.25);
  --glass-caustic: rgba(255, 255, 255, 0.05);
  --reflection-start: rgba(255, 255, 255, 0.15);
  --reflection-end: rgba(255, 255, 255, 0);
  --glare-color: rgba(255, 255, 255, 0.15);

  --pill-bg: rgba(60, 60, 65, 0.8);
  --pill-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  --icon-color: rgba(255, 255, 255, 0.55);
  --icon-active: #ffffff;
  --divider: rgba(255, 255, 255, 0.15);
  --card-bg: #111113;
  --card-shell: rgba(255, 255, 255, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Poppins, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-color);
  overflow: hidden;
  transition: background 0.8s ease;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--blob-opacity);
  animation: float 20s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
  will-change: transform;
  transition: background 0.8s ease, opacity 0.8s ease;
}

.blob-1 {
  width: 52vw;
  height: 52vw;
  top: -15%;
  left: -12%;
  background: var(--blob-1);
}

.blob-2 {
  width: 46vw;
  height: 46vw;
  right: -10%;
  bottom: -15%;
  background: var(--blob-2);
  animation-delay: -5s;
}

.blob-3 {
  width: 34vw;
  height: 34vw;
  top: 32%;
  left: 42%;
  background: var(--blob-3);
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  33% {
    transform: translate(5%, 10%) scale(1.05) rotate(5deg);
  }

  66% {
    transform: translate(-5%, 5%) scale(0.95) rotate(-5deg);
  }

  100% {
    transform: translate(0, -10%) scale(1.1) rotate(0deg);
  }
}

.page-shell {
  width: min(100%, 1160px);
  min-height: 100vh;
  margin-inline: auto;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 42px;
}

.liquid-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 99px;
  background: var(--glass-bg);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  box-shadow:
    0 40px 80px -20px var(--glass-shadow),
    0 10px 30px -10px var(--glass-shadow),
    inset 0 2px 3px -1px var(--glass-highlight),
    inset 0 -2px 4px -1px var(--glass-caustic),
    inset 0 0 0 1px var(--glass-border);
  transition: all 0.5s ease;
  z-index: 10;
}

.liquid-nav::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 46%;
  border-radius: 99px 99px 24px 24px / 99px 99px 12px 12px;
  background: linear-gradient(180deg, var(--reflection-start) 0%, var(--reflection-end) 100%);
  pointer-events: none;
  z-index: 6;
  transition: background 0.5s ease;
}

.liquid-glare-container {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}

.liquid-glare {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle 90px at var(--x, 50%) var(--y, 50%), var(--glare-color) 0%, transparent 100%);
  mix-blend-mode: overlay;
}

.liquid-nav:hover .liquid-glare {
  opacity: 1;
}

.nav-items {
  position: relative;
  display: flex;
  gap: 4px;
  z-index: 3;
}

.active-pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 44px;
  background: var(--pill-bg);
  border-radius: 99px;
  box-shadow: var(--pill-shadow);
  transition: transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1), width 0.5s cubic-bezier(0.34, 1.2, 0.64, 1), background 0.5s ease, box-shadow 0.5s ease;
  z-index: 1;
}

.nav-btn {
  position: relative;
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 99px;
  background: transparent;
  color: var(--icon-color);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 44px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.3s ease;
  outline: none;
  z-index: 2;
}

.btn-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.nav-btn:active .btn-content {
  transform: scale(0.92);
}

.nav-btn.active {
  color: var(--icon-active);
}

.divider {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--divider);
  z-index: 3;
  transition: background 0.5s ease;
}

.theme-btn {
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: 2px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--icon-color);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: color 0.3s ease;
}

.theme-btn:hover,
.theme-btn:active {
  color: var(--icon-active);
}

.theme-icon-wrapper {
  position: relative;
  width: 20px;
  height: 20px;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.theme-btn:active .theme-icon-wrapper {
  transform: scale(0.8);
}

.theme-icon-wrapper svg {
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.4s ease;
  stroke-width: 2.2;
}

.sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .sun {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

#cards {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  margin-inline: auto;
}

.card {
  width: 100%;
  height: 340px;
  background-color: var(--card-shell);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

#cards:hover > .card {
  background: radial-gradient(
    400px circle at var(--mouse-x) var(--mouse-y),
    hsl(var(--color) / 1),
    var(--card-shell) 40%
  );
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    500px circle at var(--mouse-x) var(--mouse-y),
    hsl(var(--color) / 0.35),
    transparent 40%
  );
  border-radius: inherit;
  opacity: 0;
  z-index: 2;
}

#cards:hover > .card::before {
  opacity: 1;
}

.card_content {
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background-color: var(--card-bg);
  display: grid;
  grid-template-rows: 110px 52px 1fr auto;
  justify-items: center;
  align-items: center;
  row-gap: 14px;
  text-align: center;
  padding: 28px 20px 24px;
}

.card:nth-child(1) {
  --color: 348 80% 60%;
}

.card:nth-child(2) {
  --color: 195 100% 50%;
}

.card:nth-child(3) {
  --color: 0 0% 100%;
}

.card:nth-child(4) {
  --color: 220 100% 35%;
}

.card:nth-child(5) {
  --color: 0 0% 100%;
}

.card:nth-child(6) {
  --color: 330 90% 55%;
}

a {
  cursor: pointer;
}

.card_content > i {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  font-size: 5rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
}

.card_content > img.brand-logo {
  width: 160px;
  height: auto;
  max-height: 96px;
  object-fit: contain;
  opacity: 0.65;
  filter: none;
  display: block;
  background: transparent;
  mix-blend-mode: screen;
}

.card_content h2 {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 600;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card_content > a {
  width: 90%;
  max-width: 230px;
  min-height: 56px;
  padding-block: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  z-index: 10;
  margin-top: auto;
}

.card_content > a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
  .page-shell {
    justify-content: flex-start;
    padding-block: 30px;
  }

  #cards {
    width: min(100%, 720px);
    gap: 22px;
  }
}

@media (max-width: 600px) {
  .page-shell {
    padding: 24px 16px;
    gap: 28px;
  }

  .liquid-nav {
    width: min(100%, 340px);
  }

  .nav-items {
    flex: 1;
  }

  .nav-btn {
    flex: 1;
    padding-inline: 12px;
    font-size: 14px;
  }

  #cards {
    width: 100%;
    gap: 16px;
  }

  .card {
    height: 300px;
  }

  .card_content {
    grid-template-rows: 96px 48px 1fr auto;
    row-gap: 12px;
    padding: 22px 14px 18px;
  }

  .card_content > i {
    width: 82px;
    height: 82px;
    font-size: 4.2rem;
  }

  .card_content > img.brand-logo {
    width: 128px;
    max-height: 82px;
  }

  .card_content h2 {
    font-size: 1.15rem;
    min-height: 48px;
  }

  .card_content > a {
    width: 100%;
    min-height: 52px;
    font-size: 0.95rem;
  }
}

@media (max-width: 360px) {
  #cards {
    gap: 12px;
  }

  .card {
    height: 280px;
  }

  .card_content {
    padding: 18px 10px 14px;
  }

  .card_content > a {
    font-size: 0.9rem;
    gap: 6px;
  }
}
