:root {
  --bg: #0d0d0d;
  --surface: #181818;
  --surface-2: #222;
  --text: #fff;
  --text-2: #e5e2e1;
  --dim: #a1a1a1;
  --border: #262626;
  --accent: #b026ff;
  --accent-soft: #d4a0ff;
  --accent-glow: rgba(176, 38, 255, 0.18);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.08);
  --font: "Exo 2", "Segoe UI", sans-serif;
  --safe: clamp(16px, 4vw, 40px);
  --max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text-2);
  background: var(--bg);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  width: min(var(--max), calc(100% - 2 * var(--safe)));
  margin: 0 auto;
}

.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 30%),
    var(--accent-glow),
    transparent 45%
  );
  opacity: 0.9;
  transition: background 0.15s ease;
}

.dot-matrix {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: radial-gradient(#222 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.header,
main {
  position: relative;
  z-index: 1;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(13, 13, 13, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-container {
  width: min(var(--max), calc(100% - 2 * var(--safe)));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(176, 38, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  line-height: 1.1;
}

.brand__tag {
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: var(--glass-hover);
  border-color: var(--glass-border);
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero {
  padding: clamp(48px, 10vh, 96px) var(--safe) 48px;
}

.hero-content {
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39d98a;
  box-shadow: 0 0 0 4px rgba(57, 217, 138, 0.15);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.status-badge__text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
}

.hero-brand {
  margin: 0 0 8px;
  font-size: clamp(34px, 8vw, 56px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: #fff;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.hero-subtitle {
  margin: 0 auto 28px;
  max-width: 46ch;
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.5;
  color: var(--dim);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn--solid {
  color: #0d0d0d;
  background: #fff;
}

.btn--solid:hover,
.btn--solid:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.12);
}

.btn--glass {
  color: #fff;
  background: var(--glass);
  border-color: var(--glass-border);
}

.btn--glass:hover,
.btn--glass:focus-visible {
  background: var(--glass-hover);
  transform: translateY(-2px);
}

.btn--block {
  width: 100%;
}

.btn--icon {
  width: 46px;
  padding: 0;
}

.btn--sm {
  min-height: 38px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.projects,
.community {
  padding: 28px 0 64px;
}

.section-title {
  margin: 0 0 22px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: #fff;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.project-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
}

.card-media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--surface) 100%);
}

.card-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(15, 15, 15, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 8px 18px 18px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.card-desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dim);
}

.card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-box {
  padding: 12px;
  border-radius: 12px;
  background: #0c0c0c;
  border: 1px solid var(--border);
}

.stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-val {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.card-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.card-sub {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.card-reqs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 4px;
}

.req-heading {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.req-heading--min {
  color: var(--accent-soft);
}

.req-heading--rec {
  color: #9fe870;
}

.req-list {
  list-style: none;
  display: grid;
  gap: 6px;
}

.req-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--dim);
}

.req-list b {
  color: #fff;
  font-weight: 600;
}

.community-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  background: #111;
  border: 1px solid var(--border);
}

.community-desc {
  margin: -8px 0 18px;
  color: var(--dim);
  max-width: 42ch;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric__num {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.metric__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.cta-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(176, 38, 255, 0.08);
  border: 1px solid rgba(176, 38, 255, 0.22);
}

.cta-side__title {
  font-size: 22px;
  color: #fff;
}

.cta-side__text {
  color: var(--dim);
  font-size: 14px;
}

.system-status {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #6f6f6f;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid rgba(176, 38, 255, 0.35);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .community-panel,
  .metrics,
  .card-reqs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .card-sub {
    grid-template-columns: 1fr;
  }

  .btn--icon {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal,
  .status-badge__dot {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
