:root {
  color-scheme: dark;
  --page-inline: clamp(16px, 4vw, 48px);
  --footer-height: 38px;
  --glass-border: rgb(255 255 255 / 12%);
  --muted: rgb(255 255 255 / 58%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #080a0f;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: clamp(22px, 5vh, 56px) var(--page-inline) calc(var(--footer-height) + 24px + env(safe-area-inset-bottom));
  color: #f8fafc;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  font-feature-settings: "kern", "liga";
  letter-spacing: 0.015em;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
}

body::before {
  background: #080a0f url("bckgrd.jpg") center / cover no-repeat;
  transform: scale(1.025);
}

body::after {
  z-index: -1;
  background: linear-gradient(180deg, rgb(0 0 0 / 16%), rgb(0 0 0 / 32%));
}

.dashboard {
  display: grid;
  align-content: center;
  gap: clamp(18px, 3vw, 30px);
  width: min(1180px, 100%);
  min-height: calc(100dvh - var(--footer-height) - clamp(68px, 10vh, 112px));
  margin-inline: auto;
}

.category {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 5%), rgb(255 255 255 / 1%)),
    rgb(0 0 0 / 56%);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 10%) inset,
    0 -1px 0 rgb(0 0 0 / 24%) inset,
    0 24px 70px rgb(0 0 0 / 28%);
  -webkit-backdrop-filter: blur(7px) saturate(105%);
  backdrop-filter: blur(7px) saturate(105%);
}

.category::before {
  position: absolute;
  top: 0;
  left: 12%;
  width: 52%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 52%), transparent);
  content: "";
}

.category-header {
  display: flex;
  align-items: end;
  gap: 20px;
  margin-bottom: 20px;
  padding-inline: 2px;
}

.eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.category h2 {
  margin: 0;
  font-size: clamp(23px, 2.4vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

.tile {
  --accent: 96 165 250;
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 146px;
  padding: 18px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgb(var(--accent) / 44%);
  border-radius: 17px;
  color: #fff;
  text-decoration: none;
  background:
    radial-gradient(circle at 14% 8%, rgb(var(--accent) / 42%), transparent 52%),
    linear-gradient(145deg, rgb(var(--accent) / 20%), rgb(0 0 0 / 38%) 72%),
    rgb(0 0 0 / 46%);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 12%) inset,
    0 -1px 0 rgb(0 0 0 / 24%) inset,
    0 10px 28px rgb(0 0 0 / 20%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.tile::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 28%, rgb(255 255 255 / 12%) 46%, transparent 64%);
  content: "";
  opacity: 0;
  transform: translateX(-45%);
  transition: opacity 180ms ease, transform 420ms ease;
}

.tile:hover,
.tile:focus-visible {
  border-color: rgb(var(--accent) / 58%);
  outline: none;
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 18%) inset,
    0 -1px 0 rgb(0 0 0 / 28%) inset,
    0 18px 40px rgb(0 0 0 / 34%),
    0 0 26px rgb(var(--accent) / 13%);
}

.tile:hover::before,
.tile:focus-visible::before {
  opacity: 1;
  transform: translateX(45%);
}

.icon-shell {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 13px;
  background: rgb(255 255 255 / 8%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 12%) inset;
}

.icon-shell .material-icons,
.icon-shell .material-symbols-outlined {
  color: rgb(var(--accent));
  font-size: 25px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 28;
}

.tile-name {
  align-self: end;
  display: -webkit-box;
  max-width: calc(100% - 50px);
  overflow: hidden;
  font-size: clamp(22px, 1.7vw, 24px);
  line-height: 1.14;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.corner-label {
  position: absolute;
  right: 13px;
  bottom: 13px;
  min-width: 29px;
  padding: 4px 8px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 999px;
  color: rgb(255 255 255 / 64%);
  background: rgb(2 6 12 / 38%);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.corner-label .full-text {
  display: none;
}

.corner-label:hover .symbol,
.tile:focus-visible .corner-label .symbol {
  display: none;
}

.corner-label:hover .full-text,
.tile:focus-visible .corner-label .full-text {
  display: inline;
}

.footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  min-height: var(--footer-height);
  padding: 9px 16px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid rgb(255 255 255 / 10%);
  color: rgb(255 255 255 / 62%);
  background: rgb(0 0 0 / 58%);
  box-shadow: 0 -12px 38px rgb(0 0 0 / 16%);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: center;
  -webkit-backdrop-filter: blur(8px) saturate(105%);
  backdrop-filter: blur(8px) saturate(105%);
}

@media (max-width: 560px) {
  :root {
    --page-inline: 13px;
  }

  body {
    padding-top: 14px;
  }

  .dashboard {
    align-content: start;
    gap: 14px;
  }

  .category {
    padding: 17px;
    border-radius: 20px;
  }

  .category-header {
    margin-bottom: 15px;
  }

  .tiles {
    gap: 12px;
  }

  .tile {
    min-height: 116px;
    border-radius: 15px;
  }

  .icon-shell {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .icon-shell .material-icons,
  .icon-shell .material-symbols-outlined {
    font-size: 23px;
  }
}

@media (hover: none) {
  .tile:active {
    transform: scale(0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .category,
  .footer {
    background-color: rgb(5 8 14 / 94%);
  }
}
