:root {
  --bg: #0b0c10;
  --panel: #12141a;
  --panel-2: #181b23;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.16);
  --text: #e9eaf0;
  --muted: #9a9ca6;
  --accent: #8f97ff;
  --accent-ink: #0b0c10;
  --ok: #5fe39a;
  --display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  background: rgb(11 12 16 / 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.mark {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.mark span { color: var(--accent); }

#nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
#nav::-webkit-scrollbar { display: none; }
#nav a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
#nav a:hover { color: var(--text); background: var(--panel-2); }

/* ---------- hero ---------- */

.hero {
  padding: clamp(32px, 7vw, 96px) var(--gutter) clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero h1 {
  margin: 0;
  font-size: clamp(6.5rem, 30vw, 27rem);
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: -0.065em;
  margin-left: -0.05em;
  background: linear-gradient(180deg, var(--text) 30%, var(--accent) 135%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.1em;
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: clamp(20px, 3vw, 40px);
}

.lede {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  max-width: 22ch;
}

.count {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- projects ---------- */

.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(40px, 7vw, 104px) var(--gutter);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 60px;
}

.p-head { position: sticky; top: 92px; align-self: start; }

.p-index {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}
.p-index::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.p-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: block;
  object-fit: cover;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -20px rgb(0 0 0 / 0.9);
}

.p-name {
  margin: 24px 0 8px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.p-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 28ch;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.status.is-live { color: var(--text); }
.status.is-live::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); }

.p-body { min-width: 0; }

.p-desc {
  margin: 0 0 28px;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  max-width: 52ch;
}

.chips {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- download box ---------- */

.get {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
}

.get-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 17px var(--display);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 10px 30px -12px var(--accent);
}
.btn svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -12px var(--accent); }
.btn:hover svg { transform: translateY(2px); }
.btn:active { transform: scale(0.98); }

.specs {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 16px;
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
}
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }

.get-note {
  margin: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.hash {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.hash code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
}
.hash button {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  min-height: 32px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.hash button:hover { border-color: var(--line-strong); }

.get.is-empty .get-main { color: var(--muted); font-size: 15px; }

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 28px var(--gutter) 40px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: rise 0.9s var(--ease) both; }
  .hero-foot { animation: rise 0.9s 0.12s var(--ease) both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  .project { grid-template-columns: 1fr; }
  .p-head { position: static; }
  .p-icon { width: 72px; height: 72px; border-radius: 18px; }
  .btn { width: 100%; justify-content: center; }
}
