/* ==========================================================================
   jordanmatthews.com
   Theme: light by default, dark via system preference or [data-theme="dark"].
   ========================================================================== */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #5b5b63;
  --border: #e4e2dc;
  --accent: #1d4ed8;
  --accent-contrast: #ffffff;
  --accent-2: #b45309;
  --radius: 10px;
  --maxw: 60rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111214;
    --surface: #1a1b1e;
    --text: #ececee;
    --muted: #a1a1aa;
    --border: #2c2d31;
    --accent: #7aa2ff;
    --accent-contrast: #0b0c0e;
    --accent-2: #f5a65b;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111214;
  --surface: #1a1b1e;
  --text: #ececee;
  --muted: #a1a1aa;
  --border: #2c2d31;
  --accent: #7aa2ff;
  --accent-contrast: #0b0c0e;
  --accent-2: #f5a65b;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); margin: .25rem 0 1rem; max-width: 18ch; }
h2 { font-size: 1.6rem; margin: 0 0 1.25rem; }
h3 { font-size: 1.15rem; margin: 0 0 .5rem; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-contrast); padding: .5rem 1rem;
}
.skip:focus { left: 1rem; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 3.5rem;
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 2.25rem; height: 2.25rem; padding: 0;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Sections */
section.wrap { padding-top: 2.25rem; padding-bottom: 2.25rem; }
section + section { border-top: 1px solid var(--border); }

.hero.wrap { padding-top: 3rem; padding-bottom: 2.5rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .8rem; color: var(--accent-2); font-weight: 600; margin: 0;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 42rem; }
.section-intro { color: var(--muted); max-width: 42rem; margin-top: 0; }

.button {
  display: inline-block; background: var(--accent); color: var(--accent-contrast);
  padding: .7rem 1.2rem; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; overflow-wrap: anywhere;
}
.button:hover { filter: brightness(1.08); }

/* Cards */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.4rem;
}
.card p { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.site-footer p { margin: 0; }
