/* andyhay.info - hand-written styles, no framework */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #59636e;
  --surface: #f6f8fa;
  --border: #d1d9e0;
  --link: #0a58ca;
  --band: #2b5797; /* matches msapplication-TileColor */
  --band-fg: #ffffff;
  --radius: 0.5rem;
  --wrap: 60rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --fg: #e6edf3;
    --muted: #9198a1;
    --surface: #161b22;
    --border: #30363d;
    --link: #6cb6ff;
    --band: #1c3a66;
  }
}

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

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

a {
  color: var(--link);
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1rem;
}

/* Header band */
.site-header {
  background: var(--band);
  color: var(--band-fg);
  padding-block: 1.5rem;
  margin-bottom: 2rem;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Two cards side by side, stacked on narrow screens */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.card h2 {
  margin-top: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Outline button */
.btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  background: var(--fg);
  color: var(--bg);
}

.site-footer {
  margin-top: 2.5rem;
  padding-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Rule inside the padding, so it lines up with the cards */
.site-footer::before {
  content: "";
  display: block;
  border-top: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.site-footer p {
  margin: 0.25rem 0;
}
