/* ==========================================================================
   bixjohnson.com — site styles
   Edit the tokens in :root below to restyle the whole site at once.
   ========================================================================== */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f3f2ec;
  --text: #1d1d1b;
  --muted: #6b6b66;
  --accent: #2f5d50;
  --accent-soft: #e4eeea;
  --line: #e3e2da;
  --shadow: 0 1px 2px rgba(29, 29, 27, 0.04), 0 8px 24px rgba(29, 29, 27, 0.05);
  --radius: 14px;
  --measure: 760px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --surface: #1f1f1c;
    --surface-2: #262622;
    --text: #f1f0ea;
    --muted: #a3a29b;
    --accent: #8fc4b3;
    --accent-soft: #23312c;
    --line: #34342f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

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

a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; }

/* Skip link ------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { left: 16px; }

/* Nav ------------------------------------------------------------------- */
.site-nav {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  gap: 8px 20px;
  align-items: baseline;
  flex-wrap: wrap;
}
.site-nav .brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  letter-spacing: -0.01em;
}
.site-nav a:not(.brand) {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.site-nav a:not(.brand):hover { color: var(--text); }

/* Layout ---------------------------------------------------------------- */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 36px 24px 56px;
}

main > header { margin: 0 0 48px; }
/* Breathing room between a page intro and the first section */
main > h1 + .lead { margin-bottom: 40px; }
section { margin: 0 0 56px; }
section:last-child { margin-bottom: 0; }

/* Type ------------------------------------------------------------------ */
h1 {
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 10px;
}
h2 {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
h3 { margin: 0 0 6px; font-size: 1.125rem; }
p { font-size: 1.0625rem; margin: 0 0 16px; }
.lead { font-size: 1.1875rem; }
.accent { color: var(--accent); font-weight: 600; margin: 0 0 20px; }
.muted { color: var(--muted); font-size: 1rem; }
.small { font-size: 0.9375rem; }

/* A heading with a hairline running to the end of the row */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 20px;
}
.section-head h2 { margin: 0; white-space: nowrap; }
.section-head .rule { flex: 1; height: 1px; background: var(--line); }
.section-head .more { font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.section-head .more:hover { text-decoration: underline; }

/* Hero ------------------------------------------------------------------ */
.hero {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin: 0 0 48px;
}
.hero-body { flex: 1; min-width: 0; }
.hero p:last-child { margin-bottom: 0; }

/* Swap .avatar's text for <img class="avatar" src="me.jpg" alt="Bix Johnson"> */
.avatar {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
@media (max-width: 560px) {
  .hero { flex-direction: column; gap: 20px; }
  .avatar { width: 76px; height: 76px; font-size: 1.5rem; }
}

/* Buttons --------------------------------------------------------------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
}
.btn-ghost:hover { background: var(--accent-soft); }

/* Cards ----------------------------------------------------------------- */
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 16px;
  text-decoration: none;
  color: inherit;
}
a.card { transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
a.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card h3 { color: var(--text); }
.card p { margin: 0; color: var(--muted); font-size: 1rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card-grid .card { margin: 0; height: 100%; }

/* Three-across variant for short "what I do" style cards */
.card-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Small label chips (tech used, skills) --------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}
.chip {
  font-size: 0.8125rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 11px;
}
.card .chips { margin-top: 14px; }

/* Resume ---------------------------------------------------------------- */
.entry {
  position: relative;
  padding: 0 0 4px 22px;
  margin: 0 0 28px;
  border-left: 1px solid var(--line);
}
.entry:last-child { margin-bottom: 0; }
.entry::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.entry-head {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  align-items: baseline;
  margin-bottom: 6px;
}
.entry-head h3 { margin: 0; }
.entry .where { color: var(--accent); font-weight: 600; font-size: 1rem; }
.entry .when {
  color: var(--muted);
  font-size: 0.875rem;
  margin-left: auto;
  white-space: nowrap;
}
.entry ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.entry ul li { margin: 0 0 6px; font-size: 1rem; }
.entry > p { margin: 0; color: var(--muted); font-size: 1rem; }

.skill-group { margin: 0 0 18px; }
.skill-group h3 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; }
.skill-group .chips { margin: 0; }
.skill-group .chip { color: var(--text); }

/* Footer ---------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.site-footer .inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 28px 24px 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer .inner p { margin: 0; font-size: inherit; }
.site-footer nav { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }

/* Print (so the resume page prints cleanly) ----------------------------- */
@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --text: #111;
    --muted: #444;
    --accent: #1f3f36;
    --line: #ccc;
    --shadow: none;
  }
  .site-nav, .site-footer, .actions, .skip-link, .no-print { display: none !important; }
  main { max-width: none; padding: 0; }
  section { margin-bottom: 28px; page-break-inside: avoid; }
  .entry { page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
