:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #57534e;
  --faint: #a8a29e;
  --border: #e7e5e4;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --surface: #1c1917;
    --text: #f5f5f4;
    --muted: #a8a29e;
    --faint: #78716c;
    --border: #292524;
    --accent: #60a5fa;
    --accent-soft: #172554;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 20px 48px;
}

/* Intro */
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 36em;
}

.links {
  display: flex;
  gap: 20px;
  font-weight: 500;
}

/* Sections */
section { margin-top: 64px; }

h2 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin: 0 0 16px;
}

section > p { margin: 0 0 14px; color: var(--text); }
section > p:last-child { margin-bottom: 0; }
section > p.aside { color: var(--muted); font-size: 0.95rem; }

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.timeline li:first-child { padding-top: 0; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when {
  font-size: 0.85rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.timeline strong { font-weight: 600; display: block; }
.timeline .where { color: var(--muted); font-size: 0.92rem; }

@media (max-width: 480px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags li {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--muted);
}

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

.app {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.app:hover {
  border-color: var(--faint);
  transform: translateY(-2px);
}

.app-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.kind {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--faint);
}

.app p {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: var(--muted);
  flex-grow: 1;
}

.app-links {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Footer */
footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--faint);
}
footer p { margin: 0; }

@media (max-width: 480px) {
  .wrap { padding-top: 48px; }
  section { margin-top: 48px; }
  .apps { grid-template-columns: 1fr; }
}
