:root {
  --bg: #121212;
  --surface: #1c1c1e;
  --text: #ececec;
  --muted: #a0a0a5;
  --border: #2e2e32;
  --accent: #7aa7ff;
  --radius: 10px;
  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

.page {
  max-width: 1168px;
  margin: 0 auto;
  padding: 48px 32px;
}

.intro { padding-top: 64px; }
.avatar { border-radius: 50%; display: block; margin-bottom: 20px; object-fit: cover; }
h1 { font-size: 2rem; margin: 0 0 4px; letter-spacing: -0.01em; }
.tagline { color: var(--muted); margin: 0; font-size: 1.1rem; }
.bio { margin: 0; }

section { margin-bottom: 40px; }

/* Two halves: David Rossi (light) on the left, @bogusjimmy (dark) on the right */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split section { margin: 0; padding: 48px 32px; }
.half-inner { max-width: 520px; }
.light .half-inner { margin-left: auto; }
.light {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #5f6368;
  --border: #e3e3e3;
  --accent: #1f5fbf;
  color-scheme: light;
}
.dark { --bg: #0b0b0c; }
.half { background: var(--bg); color: var(--text); }

@media (max-width: 720px) {
  .split { grid-template-columns: 1fr; }
  .split section { padding: 32px 16px; }
  .page { padding: 32px 16px; }
  .intro { padding-top: 48px; }
}

h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 12px;
}

ul { list-style: none; margin: 0; padding: 0; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  display: block;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover, .card:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.card-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 1;
  border-bottom: 1px solid var(--border);
}
.card-preview.site { position: relative; background: var(--border); }
.card-preview.site img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.brand-facebook { background: #0866ff; }
.brand-linkedin { background: #0a66c2; }
.brand-strava { background: #fc4c02; }
.brand-ridewithgps { background: #000; }
.card-preview img.wordmark { width: 60%; height: auto; max-height: 48px; }
.brand-x { background: #000; }
.brand-instagram { background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5); }
.card-body { display: block; padding: 16px; }
.card-title { display: block; font-weight: 600; }
.card-url { display: block; color: var(--accent); font-size: 0.9rem; margin-bottom: 4px; }
.card-desc { display: block; color: var(--muted); font-size: 0.95rem; }

.contact { display: grid; gap: 12px; max-width: 680px; }
.contact-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.contact label { display: grid; gap: 4px; font-size: 0.9rem; color: var(--muted); }
.contact input, .contact textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.contact textarea { resize: vertical; }
.contact input:focus-visible, .contact textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact .botcheck { display: none; }
.contact-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.contact button {
  font: inherit;
  font-weight: 600;
  color: #0b0b0c;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  padding: 10px 20px;
  cursor: pointer;
}
.contact button:disabled { opacity: 0.6; cursor: default; }
.contact-status { margin: 0; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 720px) { .contact-row { grid-template-columns: 1fr; } }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.footer { border-top: 1px solid var(--border); padding-top: 16px; color: var(--muted); font-size: 0.9rem; }
.footer p { margin: 0 0 4px; }
.footer a { color: inherit; }

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