/* Portfolio, 2026 redesign: light engineering style, one accent, auto dark mode. No JavaScript. */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #5f6368;
  --line: #e6e6e3;
  --accent: #3b5bdb;          /* matches the Steadygate demo */
  --accent-ink: #ffffff;
  --accent-soft: #edf1ff;
  --pass: #1f7a3a;  --pass-bg: #e8f5ec;
  --fail: #c0262d;  --fail-bg: #fdecec;
  --warn: #8a5a00;  --warn-bg: #fdf4dc;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --radius: 10px;
  --wrap: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #18191c;
    --text: #ececec;
    --muted: #a0a4ab;
    --line: #2a2c31;
    --accent: #7c93ff;
    --accent-ink: #0b0d14;
    --accent-soft: #1c2240;
    --pass: #6fd08c;  --pass-bg: #15291c;
    --fail: #ff8a8f;  --fail-bg: #331a1c;
    --warn: #f2c25b;  --warn-bg: #2f2612;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; }
.site-header nav { display: flex; gap: 22px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-header nav a:hover { color: var(--text); }
.nav-gh { font-family: var(--mono); font-size: 14px !important; }

/* Hero */
.hero { padding-top: 96px; padding-bottom: 72px; }
.eyebrow {
  font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 700; max-width: 18ch; letter-spacing: -0.025em; }
.lede { color: var(--muted); font-size: 19px; margin: 24px 0 32px; max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px;
  border-radius: 8px; font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.term {
  margin-top: 40px; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font: 400 14px/1 var(--mono); color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
}
.term .prompt, .term .arrow, .term .dim { color: var(--muted); }

/* Badges */
.badge {
  display: inline-block; font: 500 12px/1 var(--mono); letter-spacing: 0.02em;
  padding: 4px 7px; border-radius: 5px; vertical-align: 1px; white-space: nowrap;
}
.badge.pass { color: var(--pass); background: var(--pass-bg); }
.badge.fail { color: var(--fail); background: var(--fail-bg); }
.badge.warn { color: var(--warn); background: var(--warn-bg); }

/* Sections */
.section { padding-top: 72px; padding-bottom: 24px; }
.section-title { font-size: 26px; font-weight: 700; margin-bottom: 28px; display: flex; align-items: baseline; gap: 14px; }
.num { font: 500 14px/1 var(--mono); color: var(--accent); }
.section-note { color: var(--muted); margin: -16px 0 28px; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.card-body { padding: 28px; }
.card h3 { font-size: 22px; }
.tags { font: 400 13px/1.5 var(--mono); color: var(--muted); margin: 6px 0 14px; }
.summary { font-size: 17px; }
.card-feature { margin-bottom: 20px; }
.card-feature .shot { display: block; border-bottom: 1px solid var(--line); background: #fff; }
.card-feature .shot img { width: 100%; aspect-ratio: 1280 / 430; object-fit: cover; object-position: left top; }
.card-feature .card-body { max-width: 760px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.cs { margin: 18px 0 0; display: grid; grid-template-columns: 84px 1fr; gap: 10px 14px; font-size: 15.5px; }
.cs dt { font: 500 12px/1.9 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cs dd { margin: 0; }
.links { display: flex; gap: 20px; margin: 22px 0 0; font-weight: 600; font-size: 15px; }
.links a::after { content: " →"; }

/* Unity facts */
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.facts li { padding: 22px 0; border-top: 1px solid var(--line); }
.facts h3 { font-size: 18px; margin-bottom: 8px; }
.facts p { color: var(--muted); font-size: 15.5px; margin: 0; }
.facts .stat { font: 500 14px/1 var(--mono); color: var(--accent); margin-bottom: 10px; }

/* About */
.prose { max-width: 62ch; }

/* Skills */
.skills { margin: 0; display: grid; gap: 0; }
.skills > div { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.skills dt { font-weight: 600; }
.skills dd { margin: 0; color: var(--muted); }

/* Earlier work */
.earlier { list-style: none; margin: 0; padding: 0; }
.earlier li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; gap: 16px; flex-wrap: wrap; }
.earlier a { font-weight: 600; min-width: 250px; }
.earlier span { color: var(--muted); }

/* Footer */
.site-footer { margin-top: 72px; padding: 64px 0 48px; border-top: 1px solid var(--line); background: var(--surface); }
.site-footer h2 { font-size: 26px; margin-bottom: 12px; }
.site-footer p { color: var(--muted); }
.site-footer .actions { margin: 24px 0 40px; }
.fine { font-size: 13px; }

/* Narrow screens */
@media (max-width: 820px) {
  .grid-2, .facts { grid-template-columns: 1fr; }
  .card-feature .shot img { aspect-ratio: 1280 / 560; }
  .skills > div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header nav { gap: 14px; }
  .site-header nav .nav-wide { display: none; }   /* Unity and About don't fit beside the name */
  .brand { font-size: 15px; }
  .hero { padding-top: 56px; padding-bottom: 48px; }
  .card-body { padding: 20px; }
  .cs { grid-template-columns: 1fr; gap: 2px; }
  .cs dd { margin-bottom: 10px; }
  .earlier a { min-width: 0; }
  .btn { height: 42px; }
}
