:root {
  color-scheme: dark;
  --bg: #090b10;
  --surface: #11141c;
  --surface-2: #171b25;
  --surface-hover: #1b202c;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #f5f7fb;
  --muted: #8f98aa;
  --accent: #b65cff;
  --accent-2: #6f7cff;
  --max-width: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% -10%, rgba(182, 92, 255, 0.12), transparent 32rem),
    radial-gradient(circle at 90% 5%, rgba(111, 124, 255, 0.09), transparent 28rem),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 11, 16, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.24);
  color: white;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 18px;
}

.brand-text small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.15em;
}

.search-box {
  width: min(620px, 100%);
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 15px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #858ea0;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 46px;
  padding: 0 48px 0 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.search-box input::placeholder {
  color: #747d8e;
}

.search-box input:focus {
  border-color: rgba(182, 92, 255, 0.65);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 0 0 4px rgba(182, 92, 255, 0.09);
}

.shortcut {
  position: absolute;
  right: 13px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.page-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 70px 0 80px;
}

.intro {
  max-width: 760px;
  margin-bottom: 54px;
}

.eyebrow {
  margin: 0 0 13px;
  color: #c58cff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.intro h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro-text {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.app-card {
  --card-hue: 270;
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 10%, hsla(var(--card-hue), 85%, 62%, 0.11), transparent 55%),
    linear-gradient(160deg, rgba(255,255,255,0.035), transparent 45%),
    var(--surface);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.app-card:hover,
.app-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  background-color: var(--surface-hover);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  outline: none;
}

.app-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.app-icon {
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 19px;
  background:
    linear-gradient(145deg, hsla(var(--card-hue), 84%, 65%, 0.95), hsla(calc(var(--card-hue) + 38), 76%, 47%, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.app-icon.has-image {
  background: #fff;
}

.app-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.open-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.app-card:hover .open-icon {
  color: white;
  border-color: var(--border-strong);
  transform: translate(2px, -2px);
}

.app-card-content {
  min-width: 0;
  margin-top: auto;
  padding-top: 18px;
}

.category {
  display: inline-block;
  margin-bottom: 7px;
  color: hsl(var(--card-hue), 88%, 74%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.app-title {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 18px;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.app-path {
  margin: 7px 0 0;
  overflow: hidden;
  color: #71798a;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  padding: 70px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 24px;
  text-align: center;
}

.empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 24px;
  font-weight: 800;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.empty-state p {
  margin: 0 0 20px;
  color: var(--muted);
}

.empty-state button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

footer {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 25px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  color: #697284;
  font-size: 12px;
  letter-spacing: 0.05em;
}

@media (max-width: 720px) {
  .topbar-inner {
    width: min(calc(100% - 24px), var(--max-width));
    min-height: auto;
    padding: 12px 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .brand {
    align-self: flex-start;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .search-box input {
    height: 44px;
  }

  .page-shell {
    width: min(calc(100% - 24px), var(--max-width));
    padding-top: 44px;
  }

  .intro {
    margin-bottom: 40px;
  }

  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .app-card {
    padding: 14px;
    border-radius: 18px;
  }

  .app-icon {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    font-size: 19px;
  }

  .open-icon {
    width: 28px;
    height: 28px;
  }

  .app-title {
    font-size: 15px;
  }

  .app-path {
    display: none;
  }

  footer {
    width: min(calc(100% - 24px), var(--max-width));
  }
}

@media (max-width: 390px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    aspect-ratio: auto;
    min-height: 165px;
  }
}

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

/* JSON-driven project grouping */
.group-filters {display:flex;flex-wrap:wrap;gap:9px;margin-bottom:32px}
.group-filter {font:inherit;font-size:13px;cursor:pointer;color:var(--text);border:1px solid hsla(var(--group-hue),75%,65%,.3);border-radius:100px;background:hsla(var(--group-hue),80%,55%,.08);padding:9px 13px}
.group-filter[aria-pressed="true"] {border-color:hsl(var(--group-hue),80%,65%);background:hsla(var(--group-hue),80%,55%,.25)}
.group-filter:focus-visible {outline:2px solid #fff;outline-offset:3px}
.project-groups {display:flex;flex-direction:column;gap:42px}
.project-group {border-left:3px solid hsl(var(--group-hue),80%,60%);padding-left:20px}
.group-heading {display:flex;align-items:baseline;gap:16px;margin-bottom:16px}
.group-heading h3 {margin:0;font-size:22px;color:hsl(var(--group-hue),80%,75%)}
.group-heading span {color:var(--muted);font-size:13px}
.project-group .app-card {--card-hue:var(--group-hue)}
.app-description {color:var(--muted);font-size:12px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:9px 0 0}
.app-tags {display:flex;gap:5px;flex-wrap:wrap;margin-top:9px}
.app-tags span {border:1px solid var(--border);border-radius:5px;padding:2px 5px;font-size:10px;color:var(--muted)}
@media(max-width:720px) {.project-group {padding-left:11px}.project-groups {gap:30px}.app-description {-webkit-line-clamp:2}.app-tags {display:none}}

[hidden] {display:none !important;}

.news-nav-link{color:#e1c0ff;font-size:13px;font-weight:800;letter-spacing:.1em;text-decoration:none}
.news-nav-link:hover{text-decoration:underline}
.home-news{margin-bottom:64px}
.home-news-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.home-news-heading h2{font-size:26px;letter-spacing:-.03em;margin:0}
.home-news-heading a{color:#cbb0ff;text-decoration:none;font-size:14px}
.news-slide{display:flex;align-items:end;min-height:350px;position:relative;border-radius:24px;overflow:hidden;padding:40px;isolation:isolate;text-decoration:none;background:radial-gradient(circle at 75% 30%,rgba(177,92,255,.35),transparent 45%),radial-gradient(circle at 30% 100%,rgba(68,77,194,.25),transparent 60%),#11141c;border:1px solid var(--border)}
.news-slide:after{content:"NEWS";position:absolute;font-weight:900;letter-spacing:-.1em;font-size:clamp(130px,24vw,360px);top:-50px;right:0;color:rgba(255,255,255,.025);z-index:-1}
.news-slide-content{max-width:730px}
#newsCategory{font-size:12px;color:#d6b5ff;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
#newsTitle{font-size:clamp(31px,5vw,55px);letter-spacing:-.05em;line-height:1.07;margin:15px 0}
#newsDescription{font-size:16px;color:#d6d5e2;line-height:1.5;margin:0 0 24px}
.news-read{font-size:13px;font-weight:800;color:#fff}
.news-carousel-controls{display:flex;justify-content:center;align-items:center;gap:24px;padding-top:16px}
.news-carousel-controls>button{height:36px;width:40px;font:inherit;font-size:25px;border-radius:9px;border:1px solid var(--border);background:var(--surface);color:white;cursor:pointer}
.news-dots{display:flex;align-items:center;gap:8px}
.news-dots button{width:9px;height:9px;border:0;border-radius:10px;background:#63677b;cursor:pointer;padding:0}
.news-dots button[aria-pressed=true]{width:28px;background:#bc86ff}
@media(max-width:720px){.news-nav-link{align-self:flex-start}.home-news{margin-bottom:46px}.news-slide{padding:24px;min-height:330px}}
