:root {
  --bg: #0b0d0f;
  --bg-elevated: #13161a;
  --border: #23272d;
  --text: #e8e6e1;
  --text-dim: #9aa0a6;
  --text-faint: #666d75;
  --accent: #f7931a;
  --accent-nostr: #8b5cf6;
  --radius: 10px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f6f3;
    --bg-elevated: #ffffff;
    --border: #e1ddd5;
    --text: #1a1a1a;
    --text-dim: #55595e;
    --text-faint: #8a8f94;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}

.cursor { color: var(--accent); }

.nav {
  display: flex;
  gap: 22px;
}

.nav a {
  text-decoration: none;
  font-size: 14px;
  color: var(--text-dim);
}

.nav a:hover { color: var(--text); }

/* Hero */

.hero {
  padding: 88px 20px 64px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 18px;
  letter-spacing: .02em;
}

.hero h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.lede {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 58ch;
  margin: 20px 0 0;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat strong {
  font-family: var(--font-mono);
  font-size: 16px;
}

.stat span {
  font-size: 13px;
  color: var(--text-faint);
}

/* Sections */

section { padding: 56px 20px; }

section h2 {
  font-size: 24px;
  letter-spacing: -0.01em;
}

.section-sub {
  color: var(--text-dim);
  margin: -6px 0 32px;
  max-width: 60ch;
}

.principles { border-top: 1px solid var(--border); }
.projects { border-top: 1px solid var(--border); }
.links { border-top: 1px solid var(--border); }

/* Principle cards */

.grid { display: grid; gap: 16px; }

.grid-principles {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  margin-top: 28px;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-dim);
  font-size: 14.5px;
  margin: 0;
}

/* Projects */

.group-title {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  margin: 36px 0 14px;
}

.group-title:first-of-type { margin-top: 8px; }

.grid-projects {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.repo-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.repo-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.repo-name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.repo-name:hover { color: var(--accent); }

.repo-org {
  font-size: 12px;
  color: var(--text-faint);
}

.repo-desc {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
  flex-grow: 1;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge.lang::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
}

.badge.lang[data-lang="kotlin"]::before { background: #a97bff; }
.badge.lang[data-lang="dart"]::before { background: #00b4ab; }

.badge.stars { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

/* Links */

.link-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.link-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.link-card:hover { border-color: var(--accent); }

.link-label {
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.link-value {
  font-family: var(--font-mono);
  font-size: 15px;
}

.cta {
  color: var(--text-dim);
  margin-top: 24px;
  font-size: 14px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
}

.footer-row {
  color: var(--text-faint);
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 560px) {
  .nav { gap: 14px; }
  .hero { padding: 64px 20px 48px; }
  section { padding: 44px 20px; }
}
