/* Light by default, dark when the visitor's system is dark. */
:root {
  --bg: #fbfbf9;
  --card: #ffffff;
  --line: #e7e6e1;
  --text: #16171a;
  --muted: #6b6e75;
  --accent: #0f9d63;
  --accent-soft: rgba(15, 157, 99, 0.1);
  --amber: #b7791f;
  --amber-soft: rgba(214, 158, 46, 0.14);
  --dots: rgba(0, 0, 0, 0.07);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --card: #15181c;
    --line: #252a30;
    --text: #eceef0;
    --muted: #8e959d;
    --accent: #6ef0b0;
    --accent-soft: rgba(110, 240, 176, 0.1);
    --amber: #ffc86b;
    --amber-soft: rgba(255, 200, 107, 0.12);
    --dots: rgba(255, 255, 255, 0.06);
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(var(--dots) 1px, transparent 1px) 0 0 / 22px 22px fixed,
    var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 20px 64px;
}

/* Profile header */

.profile { display: flex; gap: 22px; align-items: flex-start; }

.avatar {
  flex: none;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, #6ef0b0, #2bb5c9);
  color: #07261b;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.03em;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line);
}

h1 { margin: 6px 0 6px; font-size: 30px; line-height: 1.15; letter-spacing: -0.025em; }

.tagline { margin: 0 0 14px; font-size: 17px; color: var(--muted); }
.stats { margin: 0; color: var(--muted); }
.stats b { color: var(--text); }

.socials {
  list-style: none;
  margin: 26px 0 56px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

a.social { color: var(--text); }
a.social:hover { color: var(--accent); }
.social svg { width: 17px; height: 17px; fill: currentColor; }
.social i { font-style: normal; font-size: 12px; opacity: 0.7; }

/* Sections */

section + section { margin-top: 56px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

h2 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.count { color: var(--muted); font-size: 15px; }

/* App cards */

.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.app {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.app:hover { border-color: var(--accent); transform: translateY(-2px); }

.app-top { display: flex; align-items: center; gap: 11px; }

.icon {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.icon img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

.i1 { background: linear-gradient(140deg, #34d399, #0f9d63); }
.i2 { background: linear-gradient(140deg, #38bdf8, #2563eb); }
.i3 { background: linear-gradient(140deg, #fbbf24, #ea7a17); }

.app h3 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }

.badge {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--line);
  color: var(--muted);
}

.badge.building { background: var(--amber-soft); color: var(--amber); }
.badge.beta { background: rgba(56, 189, 248, 0.14); color: #2b9fd9; }
.badge.launched { background: var(--accent-soft); color: var(--accent); }

.app p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

.empty {
  margin: 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

footer {
  padding: 28px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

footer p { margin: 0; }

@media (max-width: 520px) {
  main { padding-top: 48px; }
  .profile { flex-direction: column; gap: 14px; }
  h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .app { transition: none; }
}
